Files
IoTManager/src/modules/API.cpp
2022-02-22 22:47:21 +03:00

42 lines
2.7 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 на название вашего сенсора
void* getAPI_AnalogAdc(String subtype, String params);
void* getAPI_Ds18b20(String subtype, String params);
void* getAPI_Sht20(String subtype, String params);
void* getAPI_Dht1122(String subtype, String params);
void* getAPI_Bmp280(String subtype, String params);
void* getAPI_Bme280(String subtype, String params);
void* getAPI_Aht20(String subtype, String params);
void* getAPI_Hdc1080(String subtype, String params);
void* getAPI_GY21(String subtype, String params);
void* getAPI_Lcd2004(String subtype, String params);
void* getAPI_SysExt(String subtype, String params);
void* getAPI_Ads1115(String subtype, String params);
void* getAPI_Mcp23017(String subtype, String params);
void* getAPI_ButtonOut(String subtype, String params);
//============================================================================================
void* getAPI(String subtype, String params) {
void* tmpAPI;
//===============================================================================================================
//здесь нужно скопировать строку еще раз и вставить ее ниже, переименовав AnalogAdc на название вашего сенсора
if ((tmpAPI = getAPI_AnalogAdc(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Ds18b20(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Dht1122(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Bmp280(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Bme280(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Aht20(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Hdc1080(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_GY21(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_SysExt(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Ads1115(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI;
//================================================================================================================
return nullptr;
}