Skip to content

Commit c208277

Browse files
authored
Merge pull request #197 from ngraziano/correct-strange-opmode-flag-modif
The reset of flag is not correct for the OP_NEXTCHNL part while processing a join-accept
2 parents 2f6cabe + 5930508 commit c208277

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lmic/lmic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,8 @@ static bit_t processJoinAccept (void) {
11711171
LMIC.datarate = AS923_DR_SF10;
11721172
#endif
11731173
}
1174-
LMIC.opmode &= ~(OP_JOINING|OP_TRACK|OP_REJOIN|OP_TXRXPEND|OP_PINGINI) | OP_NEXTCHNL;
1174+
LMIC.opmode &= ~(OP_JOINING|OP_TRACK|OP_REJOIN|OP_TXRXPEND|OP_PINGINI);
1175+
LMIC.opmode |= OP_NEXTCHNL;
11751176
LMIC.txCnt = 0;
11761177
stateJustJoined();
11771178
LMIC.dn2Dr = LMIC.frame[OFF_JA_DLSET] & 0x0F;

0 commit comments

Comments
 (0)