Переходим на единый базовый класс IoTItem для всех модулей

This commit is contained in:
2022-02-06 09:11:07 +03:00
parent 73bff64a54
commit 8b83e1649c
11 changed files with 50 additions and 50 deletions

View File

@@ -1,6 +1,6 @@
#include "ESPConfiguration.h"
std::vector<IoTSensor*> iotSensors;
std::vector<IoTItem*> IoTItems;
void* getAPI(String subtype, String params);
void configure(String path) {
@@ -17,9 +17,9 @@ void configure(String path) {
SerialPrint(F("E"), F("Config"), "json error " + subtype);
continue;
} else {
myIoTSensor = (IoTSensor*)getAPI(subtype, jsonArrayElement);
if (myIoTSensor) {
iotSensors.push_back(myIoTSensor);
myIoTItem = (IoTItem*)getAPI(subtype, jsonArrayElement);
if (myIoTItem) {
IoTItems.push_back(myIoTItem);
}
}
}