* new Dispatcher::getCADFailRetryDelay()

This commit is contained in:
Scott Powell committed 2025-02-27 04:05:50 +11:00
1 parent fcb213bf4d
commit 7c1c273255
13 files changed
+55 -15

No files matched your search

+12 -2
View File
@@ -35,6 +35,15 @@ void RadioLibWrapper::idle() {
state = STATE_IDLE; // need another startReceive()
}
void RadioLibWrapper::startRecv() {
int err = _radio->startReceive();
if (err == RADIOLIB_ERR_NONE) {
state = STATE_RX;
} else {
MESH_DEBUG_PRINTLN("RadioLibWrapper: error: startReceive(%d)", err);
}
}
int RadioLibWrapper::recvRaw(uint8_t* bytes, int sz) {
if (state & STATE_INT_READY) {
int len = _radio->getPacketLength();
@@ -54,10 +63,11 @@ int RadioLibWrapper::recvRaw(uint8_t* bytes, int sz) {
if (state != STATE_RX) {
int err = _radio->startReceive();
if (err != RADIOLIB_ERR_NONE) {
if (err == RADIOLIB_ERR_NONE) {
state = STATE_RX;
} else {
MESH_DEBUG_PRINTLN("RadioLibWrapper: error: startReceive(%d)", err);
}
state = STATE_RX;
}
return 0;
}