Files
IoTManager/src/modules/API.cpp

36 lines
2.3 KiB
C++
Raw Normal View History

#include "ESPConfiguration.h"
//============================================================================================
//здесь скопируйте строку и вставьте ниже, заменив имя AnalogAdc на название вашего сенсора
2022-01-16 13:31:05 +01:00
void* getAPI_AnalogAdc(String subtype, String params);
void* getAPI_Ds18b20(String subtype, String params);
2022-02-01 14:48:52 +03:00
void* getAPI_Sht20(String subtype, String params);
void* getAPI_Dht1122(String subtype, String params);
2022-02-02 11:07:27 +03:00
void* getAPI_Bmp280(String subtype, String params);
2022-02-03 18:32:31 +03:00
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);
//============================================================================================
2022-01-16 13:31:05 +01:00
void* getAPI(String subtype, String params) {
void* tmpAPI;
//===============================================================================================================
2022-01-16 14:11:24 +01:00
//здесь нужно скопировать строку еще раз и вставить ее ниже, переименовав AnalogAdc на название вашего сенсора
2022-01-16 13:31:05 +01:00
if ((tmpAPI = getAPI_AnalogAdc(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Ds18b20(subtype, params)) != nullptr) return tmpAPI;
2022-02-01 14:48:52 +03:00
if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Dht1122(subtype, params)) != nullptr) return tmpAPI;
2022-02-02 11:07:27 +03:00
if ((tmpAPI = getAPI_Bmp280(subtype, params)) != nullptr) return tmpAPI;
2022-02-03 18:32:31 +03:00
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;
//================================================================================================================
2022-01-16 13:31:05 +01:00
return nullptr;
}