diff --git a/firmware/controllers/idle_thread.cpp b/firmware/controllers/idle_thread.cpp index 9b32bd0aaa..1cd1b72b96 100644 --- a/firmware/controllers/idle_thread.cpp +++ b/firmware/controllers/idle_thread.cpp @@ -208,7 +208,7 @@ static msg_t ivThread(int param) { if (timeToStopBlip != 0) { iacPosition = blipIdlePosition; - } else if (isCrankingE(engine)) { + } else if (isCrankingOrInitialE(engine)) { // during cranking it's always manual mode, PID would make no sence during cranking iacPosition = cltCorrection * engineConfiguration->crankingIACposition; } else if (engineConfiguration->idleMode == IM_MANUAL) { diff --git a/firmware/controllers/trigger/rpm_calculator.cpp b/firmware/controllers/trigger/rpm_calculator.cpp index 6fe8faaf4e..ea3cad5936 100644 --- a/firmware/controllers/trigger/rpm_calculator.cpp +++ b/firmware/controllers/trigger/rpm_calculator.cpp @@ -158,9 +158,9 @@ int RpmCalculator::getRpm(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } #if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__) -bool isCrankingE(Engine *engine) { +bool isCrankingOrInitialE(Engine *engine) { int rpm = getRpmE(engine); - return isCrankingR(rpm); + return isCrankingR(rpm) || (rpm == 0); } #endif diff --git a/firmware/controllers/trigger/rpm_calculator.h b/firmware/controllers/trigger/rpm_calculator.h index f7a76e1037..bf80396eb6 100644 --- a/firmware/controllers/trigger/rpm_calculator.h +++ b/firmware/controllers/trigger/rpm_calculator.h @@ -81,7 +81,7 @@ private: */ #define getRpmE(engine) (engine)->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE) -bool isCrankingE(Engine *engine); +bool isCrankingOrInitialE(Engine *engine); void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX); /** * @brief Initialize RPM calculator