mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
Структурируем модули как надо
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Виртуальные элементы",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Таймер",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Расширения",
|
||||
"menuSection": "Виртуальные элементы",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Переменная",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Кнопка (подключенная физически)",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Кнопка управляющая пином (Реле с кнопкой)",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Camera OV2640 (ESPcam)",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Расширения",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Поддержка DS1302(1), DS1307(2), DS3231(3), RX8025(4)",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Сервопривод",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Расширения",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Расширитель портов Mcp23017",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "MP3 плеер",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "PWM ESP32",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "PWM ESP8266",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "SD карта",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Расширения",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Доп. функции системы",
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "Модули управления",
|
||||
"menuSection": "Исполнительные устройства",
|
||||
|
||||
"configItem": [{
|
||||
"name": "Телеграм-Бот",
|
||||
@@ -1,12 +1,7 @@
|
||||
#include "ESPConfiguration.h"
|
||||
|
||||
void* getAPI_Lcd2004(String subtype, String params);
|
||||
void* getAPI_ButtonIn(String subtype, String params);
|
||||
void* getAPI_ButtonOut(String subtype, String params);
|
||||
void* getAPI_IoTServo(String subtype, String params);
|
||||
void* getAPI_Mp3(String subtype, String params);
|
||||
void* getAPI_Pwm8266(String subtype, String params);
|
||||
void* getAPI_Timer(String subtype, String params);
|
||||
void* getAPI_Variable(String subtype, String params);
|
||||
void* getAPI_Aht20(String subtype, String params);
|
||||
void* getAPI_AnalogAdc(String subtype, String params);
|
||||
void* getAPI_Bme280(String subtype, String params);
|
||||
@@ -20,20 +15,20 @@ void* getAPI_RCswitch(String subtype, String params);
|
||||
void* getAPI_Sht20(String subtype, String params);
|
||||
void* getAPI_Sht30(String subtype, String params);
|
||||
void* getAPI_Sonar(String subtype, String params);
|
||||
void* getAPI_ButtonIn(String subtype, String params);
|
||||
void* getAPI_ButtonOut(String subtype, String params);
|
||||
void* getAPI_IarduinoRTC(String subtype, String params);
|
||||
void* getAPI_IoTServo(String subtype, String params);
|
||||
void* getAPI_Mcp23017(String subtype, String params);
|
||||
void* getAPI_Mp3(String subtype, String params);
|
||||
void* getAPI_Pwm8266(String subtype, String params);
|
||||
void* getAPI_SysExt(String subtype, String params);
|
||||
void* getAPI_Variable(String subtype, String params);
|
||||
void* getAPI_Lcd2004(String subtype, String params);
|
||||
|
||||
void* getAPI(String subtype, String params) {
|
||||
void* tmpAPI;
|
||||
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_ButtonIn(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Timer(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Variable(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Aht20(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_AnalogAdc(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Bme280(subtype, params)) != nullptr) return tmpAPI;
|
||||
@@ -47,9 +42,14 @@ if ((tmpAPI = getAPI_RCswitch(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Sht30(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Sonar(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_ButtonIn(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_IarduinoRTC(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_SysExt(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Variable(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
||||
return nullptr;
|
||||
}
|
||||
Reference in New Issue
Block a user