From 4889fd9cdcbf7e0c8802cb8dc42db87642f5d52b Mon Sep 17 00:00:00 2001 From: kasraghu Date: Tue, 20 Aug 2019 15:50:36 +0200 Subject: [PATCH] fix band selection for nextTx The output of a difference is signed integer --- lmic/lmic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmic/lmic.c b/lmic/lmic.c index 4ffdffd..fd43686 100644 --- a/lmic/lmic.c +++ b/lmic/lmic.c @@ -667,7 +667,7 @@ static ostime_t nextTx (ostime_t now) { ostime_t mintime = now + /*8h*/sec2osticks(28800); uint8_t band=0; for( uint8_t bi=0; bi<4; bi++ ) { - if( (bmap & (1< 0 ) { + if( (bmap & (1< 0 ) { #if LMIC_DEBUG_LEVEL > 1 lmic_printf("%lu: Considering band %d, which is available at %lu\n", os_getTime(), bi, LMIC.bands[bi].avail); #endif