Убираем надстройку получения времени по шаблону для переменной

This commit is contained in:
2022-04-27 13:13:51 +03:00
parent 4c315fdb12
commit 2b67fb9588
2 changed files with 5 additions and 10 deletions

View File

@@ -6,11 +6,10 @@ extern IoTRTC *watch;
class Variable : public IoTItem {
private:
String _dtFormat;
public:
Variable(String parameters): IoTItem(parameters) {
jsonRead(parameters, "dtFormat", _dtFormat);
_dtFormat = _dtFormat;
}
// особенность данного модуля - просто хранение значения для сценария, нет событий
@@ -19,10 +18,7 @@ class Variable : public IoTItem {
// }
void doByInterval() {
if (_dtFormat != "") {
value.isDecimal = false;
value.valS = watch->gettime(_dtFormat + " ");
}
}
};

View File

@@ -9,8 +9,7 @@
"page": "",
"descr": "",
"int": "1",
"val": "0",
"dtFormat": ""
"int": "0",
"val": "0"
}
]