Skip to content

Commit 4245276

Browse files
tftelkampmatthijskooijman
authored andcommitted
Fix initial channel randomization for the DECI band
It seems there was a typo in a constant, causing the CENTI band starting channel to be randomized twice, while the initial channel for the DECI band was left unset (so presumably 0). This fixes the code to properly randomize the channel again.
1 parent d1e9919 commit 4245276

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lmic/lmic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ static void initDefaultChannels (bit_t join) {
562562
LMIC.bands[BAND_CENTI].lastchnl = os_getRndU1() % MAX_CHANNELS;
563563
LMIC.bands[BAND_DECI ].txcap = 10; // 10%
564564
LMIC.bands[BAND_DECI ].txpow = 27;
565-
LMIC.bands[BAND_CENTI].lastchnl = os_getRndU1() % MAX_CHANNELS;
565+
LMIC.bands[BAND_DECI ].lastchnl = os_getRndU1() % MAX_CHANNELS;
566566
LMIC.bands[BAND_MILLI].avail =
567567
LMIC.bands[BAND_CENTI].avail =
568568
LMIC.bands[BAND_DECI ].avail = os_getTime();

0 commit comments

Comments
 (0)