From d0ece33e8e1a2332496509d4008dc1a05e24d6cc Mon Sep 17 00:00:00 2001 From: Kyle Gabriel Date: Wed, 28 Aug 2019 19:55:30 -0400 Subject: [PATCH] fix error if SINGLE_CHANNEL_GATEWAY not enabled --- main/ttn.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/ttn.ino b/main/ttn.ino index a97df43..7d02b34 100644 --- a/main/ttn.ino +++ b/main/ttn.ino @@ -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);