From 5e492c92097982f408a36e1795d3dd79e87bff1f Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Thu, 29 Aug 2024 22:17:18 -0700 Subject: [PATCH] oop --- firmware/controllers/modules/map_averaging/map_averaging.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/firmware/controllers/modules/map_averaging/map_averaging.cpp b/firmware/controllers/modules/map_averaging/map_averaging.cpp index 3978b39c31..9a9f6ba19c 100644 --- a/firmware/controllers/modules/map_averaging/map_averaging.cpp +++ b/firmware/controllers/modules/map_averaging/map_averaging.cpp @@ -183,15 +183,12 @@ void MapAveragingModule::onFastCallback() { engine->engineState.mapAveragingStart[i] = cylinderStart; } - engine->engineState.mapAveragingDuration = duration; - angle_t duration = interpolate2d(rpm, c->samplingWindowBins, c->samplingWindow); assertAngleRange(duration, "samplingDuration", ObdCode::CUSTOM_ERR_6563); // Clamp the duration to slightly less than one cylinder period float cylinderPeriod = engine->engineState.engineCycle / engineConfiguration->cylindersCount; - duration = clampF(10, duration, cylinderPeriod - 10); - + engine->engineState.mapAveragingDuration = clampF(10, duration, cylinderPeriod - 10); } // Callback to schedule the start of map averaging for each cylinder