Добавляем пример написания модуля для расширения функций сценария и системы вцелом.

This commit is contained in:
2022-02-19 10:47:15 +03:00
parent 16a778269c
commit 7c48ca6c5a
3 changed files with 64 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ 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(String subtype, String params) {
@@ -28,6 +29,7 @@ void* getAPI(String subtype, String params) {
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;
//================================================================================================================
return nullptr;