diff --git a/config.public.h b/config.public.h index c7e3ac9d507bd5d3012006688b40a09b5c3dec6d..e2c5ed23e1bd48533b9d23fe730f13826c1815ce 100644 --- a/config.public.h +++ b/config.public.h @@ -12,7 +12,7 @@ # define AMPEL_HTTP // Should HTTP web server be started? # define AMPEL_MQTT // Should data be sent over MQTT? # define AMPEL_CSV // Should data be logged as CSV, on the ESP flash memory? -// # define AMPEL_LORAWAN // Should data be sent over LoRaWAN? (Requires ESP32 + LoRa modem) +// # define AMPEL_LORAWAN // Should data be sent over LoRaWAN? (Requires ESP32 + LoRa modem, and "MCCI LoRaWAN LMIC library") /** * WIFI diff --git a/lorawan.cpp b/lorawan.cpp index 2e6c4078fe24e89b96a2bf0e875430e7f12baa46..57894c499bb466e8a64ef3978c01534b9bbbd9aa 100644 --- a/lorawan.cpp +++ b/lorawan.cpp @@ -1,5 +1,5 @@ #include "lorawan.h" -#if defined(ESP32) +#if defined(AMPEL_LORAWAN) && defined(ESP32) namespace config { // Values should be defined in config.h diff --git a/lorawan.h b/lorawan.h index fe4c9e4912008a894bc3ba8bb0de8a0e124d506b..28ec97262fa8194326a567c574997d6ac8353a5c 100644 --- a/lorawan.h +++ b/lorawan.h @@ -1,6 +1,6 @@ #ifndef AMPEL_LORAWAN_H_ #define AMPEL_LORAWAN_H_ -#if defined(ESP32) +#if defined(AMPEL_LORAWAN) && defined(ESP32) #include <Arduino.h> // Requires "MCCI LoRaWAN LMIC library", which will be automatically used with PlatformIO but should be added in "Arduino IDE". // Tested successfully with v3.2.0 and connected to a thethingsnetwork.org app.