From d9ea40032fb8c1c11e672be1220d0c4d711c057a Mon Sep 17 00:00:00 2001 From: Volker Christian Date: Fri, 11 Oct 2024 20:08:04 +0200 Subject: [PATCH] [LoRaWAN] Just for convenience: Add a frmPending field in --- src/protocols/LoRaWAN/LoRaWAN.cpp | 1 + src/protocols/LoRaWAN/LoRaWAN.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/protocols/LoRaWAN/LoRaWAN.cpp b/src/protocols/LoRaWAN/LoRaWAN.cpp index 5e994c672..26471f494 100644 --- a/src/protocols/LoRaWAN/LoRaWAN.cpp +++ b/src/protocols/LoRaWAN/LoRaWAN.cpp @@ -1807,6 +1807,7 @@ int16_t LoRaWANNode::parseDownlink(uint8_t* data, size_t* len, LoRaWANEvent_t* e event->dir = RADIOLIB_LORAWAN_DOWNLINK; event->confirmed = isConfirmedDown; event->confirming = isConfirmingUp; + event->frmPending = (downlinkMsg[RADIOLIB_LORAWAN_FHDR_FCTRL_POS] & RADIOLIB_LORAWAN_FCTRL_FRAME_PENDING) != 0; event->datarate = this->channels[RADIOLIB_LORAWAN_DOWNLINK].dr; event->freq = channels[event->dir].freq / 10000.0; event->power = this->txPowerMax - this->txPowerSteps * 2; diff --git a/src/protocols/LoRaWAN/LoRaWAN.h b/src/protocols/LoRaWAN/LoRaWAN.h index 6ff198dfe..d3c5f7150 100644 --- a/src/protocols/LoRaWAN/LoRaWAN.h +++ b/src/protocols/LoRaWAN/LoRaWAN.h @@ -504,6 +504,9 @@ struct LoRaWANEvent_t { (e.g., server downlink reply to confirmed uplink sent by user application)*/ bool confirming; + /*! \brief Whether further downlink messages are pending on the server side. */ + bool frmPending; + /*! \brief Datarate */ uint8_t datarate;