From 7488566e3cbe4578b9967fec681bf79547f61324 Mon Sep 17 00:00:00 2001 From: Manuel Bleichenbacher Date: Wed, 3 Oct 2018 20:24:18 +0200 Subject: [PATCH] Add more regions, disable class B features --- Kconfig | 15 ++++++++++++--- esp_idf_lmic_config.h | 6 +++++- src/lmic/lmic.c | 3 ++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Kconfig b/Kconfig index 5850a92..e4dd4d9 100644 --- a/Kconfig +++ b/Kconfig @@ -1,7 +1,7 @@ menu "The Things Network" choice TTN_LORA_FREQ - prompt "TTN LoRa frequency" + prompt "TTN LoRa frequency / region" default TTN_LORA_FREQ_DISABLED help LoRa frequency must match the geographic region the device is operated in. @@ -11,10 +11,19 @@ config TTN_LORA_FREQ_DISABLED bool "LoRa Disabled" config TTN_LORA_FREQ_EU_868 - bool "868 MHz (Europe)" + bool "Europe (868 MHz)" config TTN_LORA_FREQ_US_915 - bool "915 Mhz (North America)" + bool "North America (915 Mhz)" + +config TTN_LORA_FREQ_AU_921 + bool "Australia (921 Mhz)" + +config TTN_LORA_FREQ_AS_923 + bool "Asia (923 Mhz)" + +config TTN_LORA_FREQ_IN_866 + bool "India (866 Mhz)" endchoice diff --git a/esp_idf_lmic_config.h b/esp_idf_lmic_config.h index ccb5510..2384279 100755 --- a/esp_idf_lmic_config.h +++ b/esp_idf_lmic_config.h @@ -58,4 +58,8 @@ #if LMIC_DEBUG_LEVEL > 0 || LMIC_X_DEBUG_LEVEL > 0 #include -#endif \ No newline at end of file +#endif + +#define DISABLE_PING + +#define DISABLE_BEACONS diff --git a/src/lmic/lmic.c b/src/lmic/lmic.c index 85970e6..d5d21b1 100755 --- a/src/lmic/lmic.c +++ b/src/lmic/lmic.c @@ -1715,7 +1715,8 @@ static void engineUpdate (void) { #endif // !DISABLE_JOIN ostime_t now = os_getTime(); - ostime_t rxtime = 0; + // ttn-esp32 change: suppress unused variable warning + ostime_t __attribute__((unused)) rxtime = 0; ostime_t txbeg = 0; #if !defined(DISABLE_BEACONS)