[stock/gruvin9x] Better synchro when the mixer duration increases! Safety check on mixer interval.
This commit is contained in:
+4
-3
@@ -2822,10 +2822,11 @@ void perMain()
|
||||
doMixerCalculations();
|
||||
#elif !defined(PCBSKY9X)
|
||||
uint16_t t0 = getTmr16KHz();
|
||||
int16_t delta = t0 - nextMixerTime;
|
||||
if (delta < 0) return;
|
||||
int16_t delta = (nextMixerEndTime - lastMixerDuration) - t0;
|
||||
if (delta > 0 && delta < MAX_MIXER_DELTA) return;
|
||||
|
||||
nextMixerEndTime = t0 + MAX_MIXER_DELTA;
|
||||
|
||||
nextMixerTime = t0 + 20*16;
|
||||
doMixerCalculations();
|
||||
|
||||
t0 = getTmr16KHz() - t0;
|
||||
|
||||
Reference in New Issue
Block a user