diff --git a/firmware/controllers/algo/advance_map.cpp b/firmware/controllers/algo/advance_map.cpp index 6d1ba40220..2760a431dc 100644 --- a/firmware/controllers/algo/advance_map.cpp +++ b/firmware/controllers/algo/advance_map.cpp @@ -250,8 +250,9 @@ size_t getMultiSparkCount(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { floatus_t multiDelay = CONFIG(multisparkSparkDuration); floatus_t multiDwell = CONFIG(multisparkDwell); - ENGINE(engineState.multispark.delay) = US2NT(multiDelay); - ENGINE(engineState.multispark.dwell) = US2NT(multiDwell); + // dwell times are below 10 seconds here so we use 32 bit type for performance reasons + ENGINE(engineState.multispark.delay) = (uint32_t)USF2NT(multiDelay); + ENGINE(engineState.multispark.dwell) = (uint32_t)USF2NT(multiDwell); constexpr float usPerDegreeAt1Rpm = 60e6 / 360; floatus_t usPerDegree = usPerDegreeAt1Rpm / rpm;