Added 30ms sleep in OpMode_M17::offState to prevent the rtx thread from going into an endless loop.
This commit is contained in:
parent
e362a80d45
commit
44bfdec947
|
|
@ -162,13 +162,19 @@ void OpMode_M17::offState(rtxStatus_t *const status)
|
||||||
if(startRx)
|
if(startRx)
|
||||||
{
|
{
|
||||||
status->opStatus = RX;
|
status->opStatus = RX;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(platform_getPttStatus() && (status->txDisable == 0))
|
if(platform_getPttStatus() && (status->txDisable == 0))
|
||||||
{
|
{
|
||||||
startTx = true;
|
startTx = true;
|
||||||
status->opStatus = TX;
|
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)
|
void OpMode_M17::rxState(rtxStatus_t *const status)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue