diff --git a/firmware/controllers/engine_cycle/rpm_calculator.cpp b/firmware/controllers/engine_cycle/rpm_calculator.cpp index 4f9338bf63..dbc670d0ec 100644 --- a/firmware/controllers/engine_cycle/rpm_calculator.cpp +++ b/firmware/controllers/engine_cycle/rpm_calculator.cpp @@ -345,7 +345,7 @@ void tdcMarkCallback( if (isTriggerSynchronizationPoint && engine->isEngineChartEnabled && engine->tdcMarkEnabled) { // two instances of scheduling_s are needed to properly handle event overlap int revIndex2 = getRevolutionCounter() % 2; - int rpm = GET_RPM(); + int rpm = Sensor::getOrZero(SensorType::Rpm); // todo: use tooth event-based scheduling, not just time-based scheduling if (isValidRpm(rpm)) { angle_t tdcPosition = tdcPosition(); diff --git a/firmware/controllers/gauges/tachometer.cpp b/firmware/controllers/gauges/tachometer.cpp index 156d093217..b9c2e5a351 100644 --- a/firmware/controllers/gauges/tachometer.cpp +++ b/firmware/controllers/gauges/tachometer.cpp @@ -43,7 +43,7 @@ void tachSignalCallback() { } // What is the angle per tach output period? - float cycleTimeMs = 60000.0f / GET_RPM(); + float cycleTimeMs = 60000.0f / Sensor::getOrZero(SensorType::Rpm); float periodTimeMs = cycleTimeMs / periods; tachFreq = 1000.0f / periodTimeMs; diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 28a990300b..724cb20fb7 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -581,7 +581,7 @@ void TriggerState::decodeTriggerEvent( #if EFI_PROD_CODE || EFI_SIMULATOR if (triggerConfiguration.VerboseTriggerSynchDetails || (someSortOfTriggerError && !silentTriggerError)) { - int rpm = GET_RPM(); + int rpm = Sensor::getOrZero(SensorType::Rpm); floatms_t engineCycleDuration = getEngineCycleDuration(rpm); if (!engineConfiguration->useOnlyRisingEdgeForTrigger) { int time = currentCycle.totalTimeNt[0];