Stop telemetry timer when not needed

This commit is contained in:
Raphael Coeffic
2022-03-25 18:15:56 +01:00
parent a994fc708a
commit 0927847adb
+6
View File
@@ -101,6 +101,12 @@ void startPulses()
void stopPulses()
{
if (telemetryTimer) {
if( xTimerStop( telemetryTimer, 5 / RTOS_MS_PER_TICK ) != pdPASS ) {
/* The timer could not be set into the Active state. */
}
}
s_pulses_paused = true;
for (uint8_t i = 0; i < NUM_MODULES; i++)
moduleState[i].protocol = PROTOCOL_CHANNELS_UNINITIALIZED;