FSIO: GPIO implementation
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: FSIO: GPIO implementation
So next step is getting some feedback so that I know what functions are needed. It might be a stretch but I hope that this should take care of VVT.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
- contributor
- Posts: 141
- Joined: Tue Jan 07, 2014 4:38 am
- Location: Cincinnati, Ohio
- Github Username: blundar
- Slack: Dave B.
- Contact:
Re: FSIO: GPIO implementation
possibly. VCT is often more subtly complex. It's an example of where you typically need closed loop systems (PID) to achieve and maintain targets.
remember the "classic" structure:
1. table(s) to generate targets
2. open loop table(s) to establish baseline
3. PID closedloop actions to steer to target
even fueling follows the model. Target lambda + airflow = fuel req, fuel req + injector model -> pulsewidth, O2 sensors applied closed loop trims to fuel req to achieve desired behavior.
or ign... feedback via knock or Ion...
remember the "classic" structure:
1. table(s) to generate targets
2. open loop table(s) to establish baseline
3. PID closedloop actions to steer to target
even fueling follows the model. Target lambda + airflow = fuel req, fuel req + injector model -> pulsewidth, O2 sensors applied closed loop trims to fuel req to achieve desired behavior.
or ign... feedback via knock or Ion...
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: FSIO: GPIO implementation
FSIO expressions are more flexible now with user-defined settings, more @ http://rusefi.com/wiki/index.php?title=Manual:Flexible_Logic#FSIO_parameters
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: FSIO: GPIO implementation
FSIO has used-defined tables now. As with any other FSIO logic, the output controls either a digital output or PWM duty cycle.
Code: Select all
eval "300 10 1 fsio_table"
Eval result: 123.00
eval "20 400 1 fsio_table"
Eval result: 432.00
eval "30 5000 1 fsio_table"
Eval result: 432.00
eval "5000 30 1 fsio_table"
Eval result: 0.00
eval "5000 80 1 fsio_table"
Eval result: 678.00
eval "5000 80 2 fsio_table"
table #2 is emtpy
Eval result: 0.00
eval "5000 80 3 fsio_table"
Eval result: NaN (invalid table index)
eval "tps clt 1 fsio_table"
parsing failed (because "coolant" not "clt" )
eval "tps coolant 1 fsio_table"
- Attachments
-
- fsio_table_example.png (65.4 KiB) Viewed 6650 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: FSIO: GPIO implementation
I'm looking for a way to adjust idle rpm when ac is on. Can you show an example on how to change "manual idle position" percent when ac_on_switch is on?
Thanks!
Thanks!
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: FSIO: GPIO implementation
FSIO usability is still horribletomiata wrote:I'm looking for a way to adjust idle rpm when ac is on. Can you show an example on how to change "manual idle position" percent when ac_on_switch is on?
First step would be to "eval ac_on_switch" to make sure the button state is correctly integrated into the function.
2nd step would be to test "eval "0.1 0.2 ac_on_switch if" to see if output would be 0.1 or 0.2 depending on the switch (0.1 stands for 10% duty cycle, 0.2 stands for 20%)
Then you can substitute 10 and 20 with "1 fsio_setting" and "2 fsio_setting" to read from TS-accessible settings if desired.
Next step would be to assign this logic to an actual FSIO pin after un-assigning that pin from native idle control.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: FSIO: GPIO implementation
Little progress on FSIO:
system expressions are now defined in human-readable form https://svn.code.sf.net/p/rusefi/code/trunk/firmware/controllers/system_fsio.txt and automatically translated into RPN form by https://svn.code.sf.net/p/rusefi/code/trunk/firmware/gen_system_fsio.bat and become https://svn.code.sf.net/p/rusefi/code/trunk/firmware/controllers/system_fsio.h
Just a tiny but important step - ideally I would want to leverage FSIO more and more internally. Next step would be the human to RPN converter user interface in console.
system expressions are now defined in human-readable form https://svn.code.sf.net/p/rusefi/code/trunk/firmware/controllers/system_fsio.txt and automatically translated into RPN form by https://svn.code.sf.net/p/rusefi/code/trunk/firmware/gen_system_fsio.bat and become https://svn.code.sf.net/p/rusefi/code/trunk/firmware/controllers/system_fsio.h
Just a tiny but important step - ideally I would want to leverage FSIO more and more internally. Next step would be the human to RPN converter user interface in console.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: FSIO: GPIO implementation
Working on https://github.com/rusefi/rusefi/issues/369
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute