Commit 7790cf72 authored by Eric Duminil's avatar Eric Duminil
Browse files

Show frequency plan in log

parent d9a982b5
......@@ -36,13 +36,7 @@ namespace lorawan {
String last_transmission = "";
void initialize() {
Serial.print(F("Starting LoRaWAN. "));
#if CFG_LMIC_EU_like
Serial.println("Region : EU.");
#else
Serial.println("Region : US.");
#endif
Serial.println(F("Starting LoRaWAN. Frequency plan : " LMIC_FREQUENCY_PLAN " MHz."));
// More info about pin mapping : https://github.com/mcci-catena/arduino-lmic#pin-mapping
// Has been tested successfully with ESP32 TTGO LoRa32 V1, and might work with other ESP32+LoRa boards.
......
......@@ -19,6 +19,22 @@ namespace config {
extern uint16_t lorawan_sending_interval; // [s]
}
#if defined(CFG_eu868)
# define LMIC_FREQUENCY_PLAN "Europe 868"
#elif defined(CFG_us915)
# define LMIC_FREQUENCY_PLAN "US 915"
#elif defined(CFG_au915)
# define LMIC_FREQUENCY_PLAN "Australia 915"
#elif defined(CFG_as923)
# define LMIC_FREQUENCY_PLAN "Asia 923"
#elif defined(CFG_kr920)
# define LMIC_FREQUENCY_PLAN "Korea 920"
#elif defined(CFG_in866)
# define LMIC_FREQUENCY_PLAN "India 866"
#else
# error "Region should be specified"
#endif
namespace lorawan {
extern bool waiting_for_confirmation;
extern bool connected;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment