parent
c7a3422962
commit
f445c87840
|
@ -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);
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue