mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
комментирование сенсора, инструкция по интеграции
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
#include "Configuration.h"
|
||||
|
||||
extern void* getAPI_AnalogAdc(String params);
|
||||
|
||||
std::vector<IoTSensor*> iotSensors;
|
||||
|
||||
//============================================================================================
|
||||
//здесь скопируйте строку и вставьте ниже, заменив имя AnalogAdc на название вашего сенсора
|
||||
extern void* getAPI_AnalogAdc(String params);
|
||||
//============================================================================================
|
||||
|
||||
void configure(String path) {
|
||||
File file = seekFile(path);
|
||||
file.find("[");
|
||||
@@ -12,11 +15,13 @@ void configure(String path) {
|
||||
if (jsonArrayElement.startsWith(",")) {
|
||||
jsonArrayElement = jsonArrayElement.substring(1, jsonArrayElement.length()); //это нужно оптимизировать в последствии
|
||||
}
|
||||
|
||||
//===============================================================================================================
|
||||
//здесь нужно скопировать блок еще раз и вставить его ниже, переименовав AnalogAdc на название вашего сенсора
|
||||
myIoTSensor = (IoTSensor*)getAPI_AnalogAdc(jsonArrayElement);
|
||||
if (myIoTSensor) {
|
||||
iotSensors.push_back(myIoTSensor);
|
||||
}
|
||||
//================================================================================================================
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
Reference in New Issue
Block a user