mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 13:25:20 +03:00
cleanup
This commit is contained in:
parent
bd97ae0b8e
commit
a7aa7a68a8
3 changed files with 9 additions and 41 deletions
|
@ -200,33 +200,12 @@ TASK_FUNCTION(mixerTask)
|
|||
if (t0 > maxMixerDuration)
|
||||
maxMixerDuration = t0;
|
||||
|
||||
serialPrint("cnt = %d", EXTMODULE_TIMER->CNT);
|
||||
sendSynchronousPulses();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//TODO: remove that one
|
||||
void scheduleNextMixerCalculation(uint8_t module, uint16_t period_ms)
|
||||
{
|
||||
// Schedule next mixer calculation time,
|
||||
|
||||
if (isModuleSynchronous(module)) {
|
||||
nextMixerTime[module] += period_ms / RTOS_MS_PER_TICK;
|
||||
if (nextMixerTime[module] < RTOS_GET_TIME()) {
|
||||
// we are late ... let's add some small delay
|
||||
nextMixerTime[module] = (uint32_t) RTOS_GET_TIME() + (period_ms / RTOS_MS_PER_TICK);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// for now assume mixer calculation takes 2 ms.
|
||||
nextMixerTime[module] = (uint32_t) RTOS_GET_TIME() + (period_ms / RTOS_MS_PER_TICK);
|
||||
}
|
||||
|
||||
DEBUG_TIMER_STOP(debugTimerMixerCalcToUsage);
|
||||
}
|
||||
|
||||
#define MENU_TASK_PERIOD_TICKS (50 / RTOS_MS_PER_TICK) // 50ms
|
||||
|
||||
#if defined(COLORLCD) && defined(CLI)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue