Refactor: update DEVICE_ROLE to ACTUATOR and adjust sensor serialization logic
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#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/"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user