[SX1276, LoRaWAN] Fix confusing return value in LoRaWAN::processJoinAccept (#1262)
The error RADIOLIB_ERR_LORA_HEADER_DAMAGED board returned fromreadData(...) and signaled from a SX1276 is in fact correctly ignored but the state variable is not corrected. This confuses the caller due to the wrongly returned state value RADIOLIB_ERR_LORA_HEADER_DAMAGED. Change: Clear state also.
This commit is contained in:
parent
bce4d91715
commit
a7feeee1e0
1 changed files with 2 additions and 0 deletions
|
@ -688,6 +688,8 @@ int16_t LoRaWANNode::processJoinAccept(LoRaWANJoinEvent_t *joinEvent) {
|
|||
// we can ignore that error
|
||||
if(state != RADIOLIB_ERR_LORA_HEADER_DAMAGED) {
|
||||
RADIOLIB_ASSERT(state);
|
||||
} else {
|
||||
state = RADIOLIB_ERR_NONE;
|
||||
}
|
||||
|
||||
// check reply message type
|
||||
|
|
Loading…
Add table
Reference in a new issue