Oscilations in DWELL length after 40+ hours of uptime #6451

only: docs
This commit is contained in:
rusefillc 2024-05-11 15:15:18 -04:00
parent c7a3422962
commit f445c87840
2 changed files with 2 additions and 1 deletions

View File

@ -106,6 +106,7 @@ static efitick_t getNextSwitchTimeNt(PwmConfig *state) {
/**
* Once 'iteration' gets relatively high, we might lose calculation precision here.
* This is addressed by iterationLimit below, using any many cycles as possible without overflowing timeToSwitchNt
* Shall we reuse 'sumTickAndFloat' here?
*/
uint32_t timeToSwitchNt = (uint32_t)((iteration + switchTime) * periodNt);

View File

@ -38,7 +38,7 @@ inline /*64bit*/ efitick_t sumTickAndFloat(/*64bit*/efitick_t ticks, /*32it*/flo
// milliseconds to ticks
#define MS2NT(msTime) US2NT(MS2US(msTime))
// See USF2NT above for when to use MSF2NT
// See USF2NT above for when to use MSF2NT. ***WARNING*** please be aware of sumTickAndFloat
#define MSF2NT(msTimeFloat) USF2NT(MS2US(msTimeFloat))
/**