Skip to content

Commit b97f856

Browse files
committed
[LoRaWAN] Remove redundant condition
1 parent ac70f5f commit b97f856

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/protocols/LoRaWAN/LoRaWAN.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ int16_t LoRaWANNode::activateOTAA(LoRaWANJoinEvent_t *joinEvent) {
995995

996996
this->sessionStatus = RADIOLIB_LORAWAN_SESSION_ACTIVE;
997997

998+
// calculate channel flags after setting session to active
998999
(void)this->calculateChannelFlags();
9991000

10001001
return(RADIOLIB_LORAWAN_NEW_SESSION);
@@ -3443,7 +3444,7 @@ bool LoRaWANNode::calculateChannelFlags() {
34433444
} else { // RADIOLIB_LORAWAN_BAND_FIXED
34443445
// during activation of fixed bands, flag all available channels
34453446
// the datarate will be determined from there
3446-
if(!this->isActivated() && this->band->bandType == RADIOLIB_LORAWAN_BAND_FIXED) {
3447+
if(!this->isActivated()) {
34473448
memcpy(this->channelFlags, this->channelMasks, sizeof(this->channelMasks));
34483449
return(true);
34493450
}

0 commit comments

Comments
 (0)