mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
Optimise mixer runs 1.2ms before puise start
This commit is contained in:
parent
a85347b7e5
commit
57f8434de9
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ TASK_FUNCTION(mixerTask)
|
||||||
|
|
||||||
if (!s_pulses_paused) {
|
if (!s_pulses_paused) {
|
||||||
uint16_t t0 = getTmr2MHz();
|
uint16_t t0 = getTmr2MHz();
|
||||||
|
|
||||||
DEBUG_TIMER_START(debugTimerMixer);
|
DEBUG_TIMER_START(debugTimerMixer);
|
||||||
RTOS_LOCK_MUTEX(mixerMutex);
|
RTOS_LOCK_MUTEX(mixerMutex);
|
||||||
doMixerCalculations();
|
doMixerCalculations();
|
||||||
|
@ -162,7 +162,7 @@ void scheduleNextMixerCalculation(uint8_t module, uint16_t period_ms)
|
||||||
{
|
{
|
||||||
// Schedule next mixer calculation time,
|
// Schedule next mixer calculation time,
|
||||||
// for now assume mixer calculation takes 2 ms.
|
// for now assume mixer calculation takes 2 ms.
|
||||||
nextMixerTime[module] = (uint32_t)RTOS_GET_TIME() + period_ms / 2 - 1/*2ms*/;
|
nextMixerTime[module] = (uint32_t)RTOS_GET_TIME() + period_ms - 1 /*1.2ms before next pulse*/;
|
||||||
DEBUG_TIMER_STOP(debugTimerMixerCalcToUsage);
|
DEBUG_TIMER_STOP(debugTimerMixerCalcToUsage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue