Some cleanup

This commit is contained in:
Raphael Coeffic
2021-07-31 17:31:51 +02:00
parent 3ac70da582
commit 21280c4102
-25
View File
@@ -139,13 +139,7 @@ TASK_FUNCTION(mixerTask)
s_pulses_paused = true;
mixerSchedulerInit();
#if !defined(PCBSKY9X)
mixerSchedulerStart();
#endif
// clear the flag before first loop
//mixerSchedulerClearTrigger();
while (true) {
int timeout = 0;
@@ -166,13 +160,8 @@ TASK_FUNCTION(mixerTask)
GPIO_ResetBits(EXTMODULE_TX_GPIO, EXTMODULE_TX_GPIO_PIN);
#endif
#if !defined(PCBSKY9X)
// clear the flag ASAP to avoid missing a tick
//mixerSchedulerClearTrigger();
// re-enable trigger
mixerSchedulerEnableTrigger();
#endif
#if defined(SIMU)
if (pwrCheck() == e_power_off) {
@@ -191,13 +180,7 @@ TASK_FUNCTION(mixerTask)
RTOS_LOCK_MUTEX(mixerMutex);
doMixerCalculations();
#if defined(PCBSKY9X)
sendSynchronousPulses(1 << EXTERNAL_MODULE);
#else
sendSynchronousPulses((1 << INTERNAL_MODULE) | (1 << EXTERNAL_MODULE));
#endif
doMixerPeriodicUpdates();
DEBUG_TIMER_START(debugTimerMixerCalcToUsage);
@@ -211,10 +194,6 @@ TASK_FUNCTION(mixerTask)
}
#endif
#if defined(PCBSKY9X) && !defined(SIMU)
usbJoystickUpdate();
#endif
if (heartbeat == HEART_WDT_CHECK) {
WDG_RESET();
heartbeat = 0;
@@ -223,10 +202,6 @@ TASK_FUNCTION(mixerTask)
t0 = getTmr2MHz() - t0;
if (t0 > maxMixerDuration)
maxMixerDuration = t0;
// TODO:
// - check the cause of timeouts when switching
// between protocols with multi-proto RF
}
}
}