Skip to content

Commit

Permalink
Merge pull request #1267 from PCo-IoT-2024/Feature_isFrmPending
Browse files Browse the repository at this point in the history
[LoRaWAN] Add `frmPending` field in `LoRaWANEvent_t`
  • Loading branch information
StevenCellist authored Oct 11, 2024
2 parents aecef28 + d9ea400 commit 1ca12ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/protocols/LoRaWAN/LoRaWAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/protocols/LoRaWAN/LoRaWAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1ca12ab

Please sign in to comment.