better RPM examples

This commit is contained in:
rusefi 2017-07-14 22:11:04 -04:00
parent ad3c1666f6
commit a3f73296e9
5 changed files with 35 additions and 4 deletions

View File

@ -232,7 +232,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
*/
boardConfiguration->fsio_setting[0] = 5000;
// set_fsio_expression 1 "rpm > fsio_setting(1)"
setFsioExt(0, GPIOE_3, "rpm 1 fsio_setting >", 150 PASS_ENGINE_PARAMETER_SUFFIX);
setFsioExt(0, GPIOE_3, RPM_ABOVE_USER_SETTING_1, 150 PASS_ENGINE_PARAMETER_SUFFIX);
// warning light

View File

@ -56,6 +56,6 @@ void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
*/
engineConfiguration->bc.fsio_setting[0] = 500;
// set_rpn_expression 1 "rpm 0 fsio_setting <"
setFsioExt(0, GPIOE_3, "rpm 1 fsio_setting <", 0 PASS_ENGINE_PARAMETER_SUFFIX);
setFsioExt(0, GPIOE_3, RPM_BELOW_USER_SETTING_1, 0 PASS_ENGINE_PARAMETER_SUFFIX);
}

View File

@ -87,7 +87,8 @@ void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX);
#if EFI_FSIO || defined(__DOXYGEN__)
setFsio(0, GPIOD_11, "rpm 5500 >" PASS_ENGINE_PARAMETER_SUFFIX);
setFsioExt(0, GPIOC_9, RPM_ABOVE_6000_SOLENOID_80_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX);
setFsioExt(1, GPIOC_7, RPM_ABOVE_2000_SOLENOID_50_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX);
#endif
}

View File

@ -1,6 +1,6 @@
// this https://en.wikipedia.org/wiki/Reverse_Polish_notation is generated automatically
// from controllers/system_fsio.txt
// on 2017-06-25_01_22_09
// on 2017-07-14_22_00_24
//
//
// in this file we define system FSIO expressions
@ -38,9 +38,27 @@
#define RPM_ABOVE_USER_SETTING_1 "rpm 1 fsio_setting >"
// could be used for simple variable intake geometry setups or warning light or starter block
// Human-readable: rpm > fsio_setting(1)
#define RPM_ABOVE_USER_SETTING_1 "rpm 1 fsio_setting >"
// Human-readable: rpm > fsio_setting(2)
#define RPM_ABOVE_USER_SETTING_2 "rpm 2 fsio_setting >"
// Human-readable: rpm > 5500
#define RPM_ABOVE_5500_ON_OFF "rpm 5500 >"
// Human-readable: rpm > 6000
#define RPM_ABOVE_6000_ON_OFF "rpm 6000 >"
// Human-readable: (rpm > 1000) * 0.7
#define RPM_ABOVE_1000_SOLENOID_70_DUTY "rpm 1000 > 0.7 *"
// Human-readable: (rpm > 2000) * 0.5
#define RPM_ABOVE_2000_SOLENOID_50_DUTY "rpm 2000 > 0.5 *"
// Human-readable: (rpm > 6000) * 0.8
#define RPM_ABOVE_6000_SOLENOID_80_DUTY "rpm 6000 > 0.8 *"
// Human-readable: rpm < fsio_setting(1)
#define RPM_BELOW_USER_SETTING_1 "rpm 1 fsio_setting <"
// starter block using configurable parameter

View File

@ -27,8 +27,20 @@ MAIN_RELAY_LOGIC=(time_since_boot < 2) | (vbatt > 5) | in_shutdown
RPM_ABOVE_USER_SETTING_1=rpm > fsio_setting(1)
# could be used for simple variable intake geometry setups or warning light or starter block
RPM_ABOVE_USER_SETTING_1=rpm > fsio_setting(1)
RPM_ABOVE_USER_SETTING_2=rpm > fsio_setting(2)
RPM_ABOVE_5500_ON_OFF=rpm > 5500
RPM_ABOVE_6000_ON_OFF=rpm > 6000
RPM_ABOVE_1000_SOLENOID_70_DUTY=(rpm > 1000) * 0.7
RPM_ABOVE_2000_SOLENOID_50_DUTY=(rpm > 2000) * 0.5
RPM_ABOVE_6000_SOLENOID_80_DUTY=(rpm > 6000) * 0.8
RPM_BELOW_USER_SETTING_1=rpm < fsio_setting(1)
# starter block using configurable parameter