From 2b67fb95882a1b14ce47b8f8ab3074a0bb43e159 Mon Sep 17 00:00:00 2001 From: biver Date: Wed, 27 Apr 2022 13:13:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D0=B8=D1=80=D0=B0=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=B4=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D1=83=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2?= =?UTF-8?q?=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=BF=D0=BE=20=D1=88?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D1=83=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/system/Variable/Variable.cpp | 10 +++------- src/modules/system/Variable/items.json | 5 ++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/modules/system/Variable/Variable.cpp b/src/modules/system/Variable/Variable.cpp index cc9037e5..2c29182b 100644 --- a/src/modules/system/Variable/Variable.cpp +++ b/src/modules/system/Variable/Variable.cpp @@ -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 + " "); - } + } }; diff --git a/src/modules/system/Variable/items.json b/src/modules/system/Variable/items.json index 4d36fa3d..d86f6d58 100644 --- a/src/modules/system/Variable/items.json +++ b/src/modules/system/Variable/items.json @@ -9,8 +9,7 @@ "page": "", "descr": "", - "int": "1", - "val": "0", - "dtFormat": "" + "int": "0", + "val": "0" } ] \ No newline at end of file