Commit 1722ca32 authored by Eric Duminil's avatar Eric Duminil
Browse files

Project compiles with both ESP32 & ESP8266

parent a77645b5
...@@ -102,7 +102,7 @@ void setup() { ...@@ -102,7 +102,7 @@ void setup() {
csv_writer::initialize(); csv_writer::initialize();
#ifdef LORAWAN #if defined(LORAWAN) && defined(ESP32)
lorawan::initialize(); lorawan::initialize();
#endif #endif
} }
...@@ -112,7 +112,7 @@ void setup() { ...@@ -112,7 +112,7 @@ void setup() {
*****************************************************************/ *****************************************************************/
void loop() { void loop() {
#ifdef LORAWAN #if defined(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();
......
...@@ -183,7 +183,7 @@ namespace sensor { ...@@ -183,7 +183,7 @@ namespace sensor {
mqtt::publishIfTimeHasCome(timestamp, co2, temperature, humidity); mqtt::publishIfTimeHasCome(timestamp, co2, temperature, humidity);
#endif #endif
#ifdef LORAWAN #if defined(LORAWAN) && defined(ESP32)
lorawan::preparePayloadIfTimehasCome(); lorawan::preparePayloadIfTimehasCome();
#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