diff --git a/firmware/controllers/map_averaging.cpp b/firmware/controllers/map_averaging.cpp index 9100683a13..30848c0c6c 100644 --- a/firmware/controllers/map_averaging.cpp +++ b/firmware/controllers/map_averaging.cpp @@ -178,13 +178,14 @@ static void mapAveragingCallback(trigger_event_e ckpEventType, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX) { // this callback is invoked on interrupt thread UNUSED(ckpEventType); - engine->m.beforeMapAveragingCb = GET_TIMESTAMP(); if (index != CONFIG(mapAveragingSchedulingAtIndex)) return; + engine->m.beforeMapAveragingCb = GET_TIMESTAMP(); int rpm = ENGINE(rpmCalculator.rpmValue); - if (!isValidRpm(rpm)) + if (!isValidRpm(rpm)) { return; + } measurementsPerRevolution = measurementsPerRevolutionCounter; measurementsPerRevolutionCounter = 0; diff --git a/firmware/hw_layer/HIP9011.cpp b/firmware/hw_layer/HIP9011.cpp index 585d3c0c17..266cd7c540 100644 --- a/firmware/hw_layer/HIP9011.cpp +++ b/firmware/hw_layer/HIP9011.cpp @@ -230,9 +230,9 @@ static void endIntegration(void) { */ static void intHoldCallback(trigger_event_e ckpEventType, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX) { // this callback is invoked on interrupt thread - engine->m.beforeHipCb = GET_TIMESTAMP(); if (index != 0) return; + engine->m.beforeHipCb = GET_TIMESTAMP(); int rpm = engine->rpmCalculator.rpmValue; if (!isValidRpm(rpm))