File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,7 @@ ostime_t LMICas923_nextTx(ostime_t now) {
395
395
396
396
// make a mask of candidates available for use
397
397
availMap = 0 ;
398
+ feasibleMap = 0 ;
398
399
for (u1_t chnl = 0 ; chnl < MAX_CHANNELS ; ++ chnl ) {
399
400
u2_t chnlBit = 1 << chnl ;
400
401
@@ -410,9 +411,10 @@ ostime_t LMICas923_nextTx(ostime_t now) {
410
411
if ((LMIC .channelDrMap [chnl ] & (1 << (LMIC .datarate & 0xF ))) == 0 )
411
412
continue ;
412
413
413
- // not available yet?
414
+ // This channel is feasible. But might not be available.
414
415
feasibleMap |= chnlBit ;
415
416
417
+ // not available yet?
416
418
u1_t const band = LMIC .channelFreq [chnl ] & 0x3 ;
417
419
if ((s4_t )(LMIC .bands [band ].avail - mintime ) > 0 )
418
420
continue ;
Original file line number Diff line number Diff line change @@ -285,24 +285,26 @@ ostime_t LMICeu868_nextTx(ostime_t now) {
285
285
286
286
// make a mask of candidates available for use
287
287
availMap = 0 ;
288
+ feasibleMap = 0 ;
288
289
for (u1_t chnl = 0 ; chnl < MAX_CHANNELS ; ++ chnl ) {
289
290
u2_t chnlBit = 1 << chnl ;
290
291
291
292
// none at any higher numbers?
292
293
if (LMIC .channelMap < chnlBit )
293
294
break ;
294
295
295
- // not enabled?
296
+ // not enabled?
296
297
if ((LMIC .channelMap & chnlBit ) == 0 )
297
298
continue ;
298
299
299
300
// not feasible?
300
301
if ((LMIC .channelDrMap [chnl ] & (1 << (LMIC .datarate & 0xF ))) == 0 )
301
302
continue ;
302
303
303
- // not available yet?
304
+ // This channel is feasible. But might not be available.
304
305
feasibleMap |= chnlBit ;
305
306
307
+ // not available yet?
306
308
u1_t const band = LMIC .channelFreq [chnl ] & 0x3 ;
307
309
if ((s4_t )(LMIC .bands [band ].avail - mintime ) > 0 )
308
310
continue ;
You can’t perform that action at this time.
0 commit comments