Skip to content

Commit

Permalink
Merge pull request #197 from ngraziano/correct-strange-opmode-flag-modif
Browse files Browse the repository at this point in the history
The reset of flag is not correct for the OP_NEXTCHNL part while processing a join-accept
  • Loading branch information
terrillmoore committed Nov 26, 2018
2 parents 2f6cabe + 5930508 commit c208277
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lmic/lmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,8 @@ static bit_t processJoinAccept (void) {
LMIC.datarate = AS923_DR_SF10;
#endif
}
LMIC.opmode &= ~(OP_JOINING|OP_TRACK|OP_REJOIN|OP_TXRXPEND|OP_PINGINI) | OP_NEXTCHNL;
LMIC.opmode &= ~(OP_JOINING|OP_TRACK|OP_REJOIN|OP_TXRXPEND|OP_PINGINI);
LMIC.opmode |= OP_NEXTCHNL;
LMIC.txCnt = 0;
stateJustJoined();
LMIC.dn2Dr = LMIC.frame[OFF_JA_DLSET] & 0x0F;
Expand Down

0 comments on commit c208277

Please sign in to comment.