diff --git a/hardware/include/JsonTools.hpp b/hardware/include/JsonTools.hpp index 19786b4..098758c 100644 --- a/hardware/include/JsonTools.hpp +++ b/hardware/include/JsonTools.hpp @@ -11,6 +11,7 @@ #include "MAX7219.hpp" #endif +#if DEVICE_ROLE == SENSOR String serializeSensorValue( int groupId, const String &deviceId, @@ -20,6 +21,7 @@ String serializeSensorValue( const BME280Data_t &bme, const MQ7Data_t &mq7, const GPSData_t &gps); +#endif #if DEVICE_ROLE == ACTUATOR MAX7219Status_t deserializeActuatorStatus(HTTPClient &http, int httpResponseCode); diff --git a/hardware/include/globals.hpp b/hardware/include/globals.hpp index e87717f..5014f23 100644 --- a/hardware/include/globals.hpp +++ b/hardware/include/globals.hpp @@ -2,7 +2,7 @@ #include -#define DEVICE_ROLE SENSOR // se cambia entre SENSOR y ACTUATOR +#define DEVICE_ROLE ACTUATOR // se cambia entre SENSOR y ACTUATOR #define MQTT_URI "miarma.net" #define API_URI "https://contaminus.miarma.net/api/v1/" diff --git a/hardware/src/lib/http/JsonTools.cpp b/hardware/src/lib/http/JsonTools.cpp index 5d7ebf1..90b4e52 100644 --- a/hardware/src/lib/http/JsonTools.cpp +++ b/hardware/src/lib/http/JsonTools.cpp @@ -1,5 +1,6 @@ #include "JsonTools.hpp" +#if DEVICE_ROLE == SENSOR String serializeSensorValue( int groupId, const String &deviceId, @@ -39,6 +40,7 @@ String serializeSensorValue( #endif return output; } +#endif #if DEVICE_ROLE == ACTUATOR MAX7219Status_t deserializeActuatorStatus(HTTPClient &http, int httpResponseCode)