Better handling of RPM during stop of cranking #3803

refactoring: reusing existing method
This commit is contained in:
rusefillc 2022-01-17 20:52:50 -05:00
parent 9b31f96f52
commit b9a792a07c
2 changed files with 2 additions and 3 deletions

View File

@ -543,7 +543,7 @@ void EtbController::update() {
}
if (engineConfiguration->disableEtbWhenEngineStopped) {
if (engine->triggerCentral.getTimeSinceTriggerEvent(getTimeNowNt()) > 1) {
if (!engine->triggerCentral.engineMovedRecently()) {
// If engine is stopped and so configured, skip the ETB update entirely
// This is quieter and pulls less power than leaving it on all the time
m_motor->disable();

View File

@ -10,8 +10,7 @@ void FuelPumpController::onSlowCallback() {
isPrime = timeSinceIgn >= 0 && timeSinceIgn < engineConfiguration->startUpFuelPumpDuration;
// If there was a trigger event recently, turn on the pump, the engine is running!
auto timeSinceTrigger = engine->triggerCentral.getTimeSinceTriggerEvent(getTimeNowNt());
engineTurnedRecently = timeSinceTrigger < 1;
engineTurnedRecently = engine->triggerCentral.engineMovedRecently();
isPumpOn = isPrime || engineTurnedRecently;