LR2021: fix for hardware cad and side detectors

This commit is contained in:
taco
2026-08-05 14:23:32 +10:00
parent 696a82d7c2
commit 36e77671a2
+4 -1
View File
@@ -105,6 +105,9 @@ void RadioLibWrapper::loop() {
}
void RadioLibWrapper::startRecv() {
#if defined(USE_LR2021)
_radio->standby(); // without this LR2021 can throw -706 when calling startReceive after hardware CAD when side detectors are enabled
#endif
int err = _radio->startReceive();
if (err == RADIOLIB_ERR_NONE) {
state = STATE_RX;
@@ -134,7 +137,7 @@ int RadioLibWrapper::recvRaw(uint8_t* bytes, int sz) {
}
}
#if defined(USE_LR2021)
state = STATE_RX; // LR2021 stays in Rx after readData, if we issue another startReceive while still in Rx we get -706 errors.
state = STATE_RX; // LR2021 stays in Rx after readData, calling startReceive while still in Rx throws -706 errors
#else
state = STATE_IDLE; // need another startReceive()
#endif