mcci-catena / arduino-lorawan

User-friendly library for using arduino-lmic with The Things Network and other LoRaWAN® networks
MIT License
286 stars 54 forks source link

Don't notify NetSaveFCntDown() on each NetRxComplete() #14

Closed terrillmoore closed 6 years ago

terrillmoore commented 6 years ago

Arduino_LoRaWAN::NetRxComplete() unconditionally calls this->NetSaveFCntDown(). Unfortunately, this is called on each TX complete, and FCntDown might not have changed.

Instead, it should use the same logic as Arduino_LoRaWAN::StandardEventProcessor(): filter based on comparing this->m_savedFCntDown to LMIC.seqnoDn.