mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
Убираем надстройку получения времени по шаблону для переменной
This commit is contained in:
@@ -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 + " ");
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"page": "",
|
||||
"descr": "",
|
||||
|
||||
"int": "1",
|
||||
"val": "0",
|
||||
"dtFormat": ""
|
||||
"int": "0",
|
||||
"val": "0"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user