mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
Убираем надстройку получения времени по шаблону для переменной
This commit is contained in:
@@ -6,11 +6,10 @@ extern IoTRTC *watch;
|
|||||||
|
|
||||||
class Variable : public IoTItem {
|
class Variable : public IoTItem {
|
||||||
private:
|
private:
|
||||||
String _dtFormat;
|
|
||||||
public:
|
public:
|
||||||
Variable(String parameters): IoTItem(parameters) {
|
Variable(String parameters): IoTItem(parameters) {
|
||||||
jsonRead(parameters, "dtFormat", _dtFormat);
|
|
||||||
_dtFormat = _dtFormat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// особенность данного модуля - просто хранение значения для сценария, нет событий
|
// особенность данного модуля - просто хранение значения для сценария, нет событий
|
||||||
@@ -19,10 +18,7 @@ class Variable : public IoTItem {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
void doByInterval() {
|
void doByInterval() {
|
||||||
if (_dtFormat != "") {
|
|
||||||
value.isDecimal = false;
|
|
||||||
value.valS = watch->gettime(_dtFormat + " ");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
"page": "",
|
"page": "",
|
||||||
"descr": "",
|
"descr": "",
|
||||||
|
|
||||||
"int": "1",
|
"int": "0",
|
||||||
"val": "0",
|
"val": "0"
|
||||||
"dtFormat": ""
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user