avoid float -> int64 conversion #1977
both cases have to be relatively small durations of time cherry picking...
This commit is contained in:
parent
ba33a758e8
commit
662eaea384
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue