Oops, let's only try to reboot ESP32 when there's an ESP32

This commit is contained in:
Andrew Mark 2021-01-19 20:13:19 -08:00
parent 79dad8ec8c
commit dd511588a2

View File

@ -77,8 +77,10 @@ bool RadioLibInterface::canSendImmediately()
if (busyTx && (millis() - lastTxStart > 60000)){
DEBUG_MSG("Hardware Failure! busyTx for more than 60s\n");
recordCriticalError(CriticalErrorCode_TransmitFailed);
#ifndef NO_ESP32
if (busyTx && (millis() - lastTxStart > 65000)) // After 5s more, reboot
ESP.restart();
#endif
}
if (busyRx)
DEBUG_MSG("Can not send yet, busyRx\n");