prevent zero-byte read from serial causing too frequent wakeups

This commit is contained in:
m1nl 2025-06-06 21:20:20 +02:00
parent 5f3613d0e1
commit 177fdd674d

View File

@ -155,12 +155,12 @@ int32_t StreamAPI::readStream()
// If we didn't just fail the packet and we now have the right # of bytes, parse it // If we didn't just fail the packet and we now have the right # of bytes, parse it
handleToRadio(rxBuf + HEADER_LEN, len); handleToRadio(rxBuf + HEADER_LEN, len);
// we had bytes available this time, so assume we might have them next time also
lastRxMsec = millis();
} }
} }
} }
// we had bytes available this time, so assume we might have them next time also
lastRxMsec = millis();
return 0; return 0;
} }
} }