mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-28 21:56:38 +00:00
LR2021: fix for hardware cad and side detectors
This commit is contained in:
@@ -105,6 +105,9 @@ void RadioLibWrapper::loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RadioLibWrapper::startRecv() {
|
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();
|
int err = _radio->startReceive();
|
||||||
if (err == RADIOLIB_ERR_NONE) {
|
if (err == RADIOLIB_ERR_NONE) {
|
||||||
state = STATE_RX;
|
state = STATE_RX;
|
||||||
@@ -134,7 +137,7 @@ int RadioLibWrapper::recvRaw(uint8_t* bytes, int sz) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(USE_LR2021)
|
#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
|
#else
|
||||||
state = STATE_IDLE; // need another startReceive()
|
state = STATE_IDLE; // need another startReceive()
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user