[LoRaWAN] Fix downlink user-MAC commands piling up

This commit is contained in:
StevenCellist 2024-07-21 22:39:28 +02:00 committed by GitHub
parent 907d9f9ef2
commit 9195dbabda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1497,6 +1497,9 @@ int16_t LoRaWANNode::downlink(uint8_t* data, size_t* len, LoRaWANEvent_t* event)
event->fPort = fPort;
}
// clear the previous MAC commands, if any
memset(&(this->commandsDown), 0, sizeof(LoRaWANMacCommandQueue_t));
// process FOpts (if there are any)
if(fOptsLen > 0) {
// there are some Fopts, decrypt them