Files
IoTManager/src/modules/API.cpp

23 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#include "ESPConfiguration.h"
//============================================================================================
//здесь скопируйте строку и вставьте ниже, заменив имя AnalogAdc на название вашего сенсора
ModuleInfo getAPI_AnalogAdc(String subtype, String params);
ModuleInfo getAPI_ds18b20(String subtype, String params);
//============================================================================================
ModuleInfo getAPI(String subtype, String params) {
ModuleInfo tmpMi;
String defConfig = "";
//===============================================================================================================
//здесь нужно скопировать строку еще раз и вставить ее ниже, переименовав AnalogAdc на название вашего сенсора
if ((tmpMi = getAPI_AnalogAdc(subtype, params)).apiToComponent != nullptr) return tmpMi; else defConfig += tmpMi.defConfig;
//================================================================================================================
if ((tmpMi = getAPI_ds18b20(subtype, params)).apiToComponent != nullptr) return tmpMi; else defConfig += tmpMi.defConfig;
tmpMi.defConfig = defConfig;
return tmpMi;
}