Commit e2bb5beb authored by Eric Duminil's avatar Eric Duminil
Browse files

LORAWAN -> AMPEL_LORAWAN

parent 4201db6d
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#ifdef AMPEL_MQTT #ifdef AMPEL_MQTT
# include "mqtt.h" # include "mqtt.h"
#endif #endif
#ifdef LORAWAN #ifdef AMPEL_LORAWAN
# include "lorawan.h" # include "lorawan.h"
#endif #endif
#ifdef AMPEL_HTTP #ifdef AMPEL_HTTP
......
...@@ -104,7 +104,7 @@ void setup() { ...@@ -104,7 +104,7 @@ void setup() {
csv_writer::initialize(); csv_writer::initialize();
#endif #endif
#if defined(LORAWAN) && defined(ESP32) #if defined(AMPEL_LORAWAN) && defined(ESP32)
lorawan::initialize(); lorawan::initialize();
#endif #endif
} }
...@@ -114,7 +114,7 @@ void setup() { ...@@ -114,7 +114,7 @@ void setup() {
*****************************************************************/ *****************************************************************/
void loop() { void loop() {
#if defined(LORAWAN) && defined(ESP32) #if defined(AMPEL_LORAWAN) && defined(ESP32)
//LMIC Library seems to be very sensitive to timing issues, so run it first. //LMIC Library seems to be very sensitive to timing issues, so run it first.
lorawan::process(); lorawan::process();
...@@ -141,7 +141,7 @@ void loop() { ...@@ -141,7 +141,7 @@ void loop() {
mqtt::publishIfTimeHasCome(sensor::timestamp, sensor::co2, sensor::temperature, sensor::humidity); mqtt::publishIfTimeHasCome(sensor::timestamp, sensor::co2, sensor::temperature, sensor::humidity);
#endif #endif
#if defined(LORAWAN) && defined(ESP32) #if defined(AMPEL_LORAWAN) && defined(ESP32)
lorawan::preparePayloadIfTimeHasCome(sensor::co2, sensor::temperature, sensor::humidity); lorawan::preparePayloadIfTimeHasCome(sensor::co2, sensor::temperature, sensor::humidity);
#endif #endif
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
// See https://github.com/mcci-catena/arduino-lmic#configuration for more information // See https://github.com/mcci-catena/arduino-lmic#configuration for more information
// Should data be sent over LoRaWAN? // Should data be sent over LoRaWAN?
// It has been tested with "TTGO ESP32 SX1276 LoRa 868" and will only work with an ESP32 + LoRa modem // It has been tested with "TTGO ESP32 SX1276 LoRa 868" and will only work with an ESP32 + LoRa modem
# define LORAWAN # define AMPEL_LORAWAN
// How often should measurements be sent over LoRaWAN? // How often should measurements be sent over LoRaWAN?
# define LORAWAN_SENDING_INTERVAL 300 // [s] This value should not be too low. See https://www.thethingsnetwork.org/docs/lorawan/duty-cycle.html#maximum-duty-cycle # define LORAWAN_SENDING_INTERVAL 300 // [s] This value should not be too low. See https://www.thethingsnetwork.org/docs/lorawan/duty-cycle.html#maximum-duty-cycle
// This EUI must be in little-endian format, so least-significant-byte first. // This EUI must be in little-endian format, so least-significant-byte first.
......
...@@ -94,7 +94,7 @@ namespace web_server { ...@@ -94,7 +94,7 @@ namespace web_server {
"<tr><td>Last publish</td><td>%s</td></tr>\n" "<tr><td>Last publish</td><td>%s</td></tr>\n"
"<tr><td>Timestep</td><td>%5d s</td></tr>\n" "<tr><td>Timestep</td><td>%5d s</td></tr>\n"
#endif #endif
#if defined(LORAWAN) && defined(ESP32) #if defined(AMPEL_LORAWAN) && defined(ESP32)
"<tr><th colspan='2'>LoRaWAN</th></tr>\n" "<tr><th colspan='2'>LoRaWAN</th></tr>\n"
"<tr><td>Connected?</td><td>%s</td></tr>\n" "<tr><td>Connected?</td><td>%s</td></tr>\n"
"<tr><td>Frequency</td><td>%s MHz</td></tr>\n" "<tr><td>Frequency</td><td>%s MHz</td></tr>\n"
...@@ -220,7 +220,7 @@ namespace web_server { ...@@ -220,7 +220,7 @@ namespace web_server {
#ifdef AMPEL_MQTT #ifdef AMPEL_MQTT
mqtt::last_successful_publish.c_str(), config::sending_interval, mqtt::last_successful_publish.c_str(), config::sending_interval,
#endif #endif
#if defined(LORAWAN) && defined(ESP32) #if defined(AMPEL_LORAWAN) && defined(ESP32)
lorawan::connected ? "Yes" : "No", LMIC_FREQUENCY_PLAN, lorawan::last_transmission.c_str(), lorawan::connected ? "Yes" : "No", LMIC_FREQUENCY_PLAN, lorawan::last_transmission.c_str(),
config::lorawan_sending_interval, config::lorawan_sending_interval,
#endif #endif
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#ifdef AMPEL_MQTT #ifdef AMPEL_MQTT
# include "mqtt.h" # include "mqtt.h"
#endif #endif
#ifdef LORAWAN #ifdef AMPEL_LORAWAN
# include "lorawan.h" # include "lorawan.h"
#endif #endif
......
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