This commit is contained in:
rusefi 2017-07-08 15:46:34 -04:00
parent 25adc8d47b
commit c552c4800b
2 changed files with 6 additions and 0 deletions

View File

@ -379,6 +379,8 @@ void runFsio(void) {
/**
* o2 heater is off during cranking
* todo: convert to FSIO?
* open question if heater should be ON during cranking
*/
enginePins.o2heater.setValue(engine->rpmCalculator.isRunning());

View File

@ -128,6 +128,10 @@ void RpmCalculator::setRpmValue(int value DECLARE_ENGINE_PARAMETER_SUFFIX) {
} else if (rpmValue >= CONFIG(cranking.rpm)) {
state = RUNNING;
} else if (state == STOPPED) {
/**
* We are here if RPM is above zero but we have not seen running RPM yet.
* This gives us cranking hysteresis - a drop of RPM during running is still running, not cranking.
*/
state = CRANKING;
}
}