Скопом добавляем несколько сенсоров

This commit is contained in:
2022-02-17 18:25:50 +03:00
parent 52db75b8d5
commit c728d7b90c
8 changed files with 425 additions and 15 deletions

View File

@@ -8,6 +8,10 @@ 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(String subtype, String params) {
@@ -20,6 +24,10 @@ void* getAPI(String subtype, String params) {
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;
//================================================================================================================
return nullptr;