fix error if SINGLE_CHANNEL_GATEWAY not enabled

This commit is contained in:
Kyle Gabriel 2019-08-28 19:55:30 -04:00
parent ce145d8751
commit d0ece33e8e

View File

@ -73,11 +73,13 @@ void forceTxSingleChannelDr() {
// Disables all channels, except for the one defined by SINGLE_CHANNEL_GATEWAY
// This only affects uplinks; for downlinks the default
// channels or the configuration from the OTAA Join Accept are used.
#ifdef SINGLE_CHANNEL_GATEWAY
for(int i=0; i<9; i++) { // For EU; for US use i<71
if(i != SINGLE_CHANNEL_GATEWAY) {
LMIC_disableChannel(i);
}
}
#endif
// Set data rate (SF) and transmit power for uplink
LMIC_setDrTxpow(LORAWAN_SF, 14);