Меняем структуру FS для хранения модулей и добавляем скрипт сборки модулей для интеграции в меню и библиотеки

This commit is contained in:
2022-03-07 11:56:09 +03:00
parent d9e111470a
commit c453a98685
54 changed files with 964 additions and 308 deletions

View File

@@ -0,0 +1,21 @@
#include "Global.h"
#include "classes/IoTItem.h"
class Variable : public IoTItem {
public:
Variable(String parameters): IoTItem(parameters) { }
// особенность данного модуля - просто хранение значения для сценария, нет событий
// void setValue(IoTValue Value) {
// value = Value;
// }
};
void* getAPI_Variable(String subtype, String param) {
if (subtype == F("Variable")) {
return new Variable(param);
} else {
return nullptr;
}
}

View File

@@ -0,0 +1,15 @@
[
{
"name": "Переменная",
"num": 30,
"type": "Reading",
"subtype": "Variable",
"id": "var",
"widget": "",
"page": "",
"descr": "",
"int": "0",
"val": "0"
}
]