Added 30ms sleep in OpMode_M17::offState to prevent the rtx thread from going into an endless loop.

This commit is contained in:
Silvano Seva 2023-10-22 18:59:06 +02:00
parent e362a80d45
commit 44bfdec947
1 changed files with 6 additions and 0 deletions

View File

@ -162,13 +162,19 @@ void OpMode_M17::offState(rtxStatus_t *const status)
if(startRx)
{
status->opStatus = RX;
return;
}
if(platform_getPttStatus() && (status->txDisable == 0))
{
startTx = true;
status->opStatus = TX;
return;
}
// Sleep for 30ms if there is nothing else to do in order to prevent the
// rtx thread looping endlessly and locking up all the other tasks
sleepFor(0, 30);
}
void OpMode_M17::rxState(rtxStatus_t *const status)