Revert "Портируем DS18B20"

This commit is contained in:
IoT Manager
2022-01-16 13:31:05 +01:00
committed by GitHub
parent 46be36aa69
commit 5e70aa90cf
5 changed files with 16 additions and 121 deletions

View File

@@ -1,7 +1,12 @@
#include "ESPConfiguration.h"
std::vector<IoTSensor*> iotSensors;
ModuleInfo getAPI(String subtype, String params);
void* getAPI(String subtype, String params);
//============================================================================================
//здесь скопируйте строку и вставьте ниже, заменив имя AnalogAdc на название вашего сенсора
extern void* getAPI_AnalogAdc(String params);
//============================================================================================
void configure(String path) {
File file = seekFile(path);
@@ -17,7 +22,7 @@ void configure(String path) {
SerialPrint(F("E"), F("Config"), "json error " + subtype);
continue;
} else {
myIoTSensor = (IoTSensor*)getAPI(subtype, jsonArrayElement).apiToComponent;
myIoTSensor = (IoTSensor*)getAPI(subtype, jsonArrayElement);
if (myIoTSensor) {
iotSensors.push_back(myIoTSensor);
createWidget(jsonArrayElement);