From 2f22ac31f8c334842543c58c2e1d1471ccca2f9e Mon Sep 17 00:00:00 2001 From: biver Date: Tue, 23 Aug 2022 14:24:57 +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=BB=D0=B8=D1=88=D0=BD=D1=8E=D1=8E=20=D1=81=D0=B5=D0=BA=D1=83?= =?UTF-8?q?=D0=BD=D0=B4=D1=83=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=B5=20=D1=82=D0=B0=D0=B9=D0=BC=D0=B5=D1=80?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/virtual/Timer/Timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/virtual/Timer/Timer.cpp b/src/modules/virtual/Timer/Timer.cpp index 9a8e28e6..aad43c5e 100644 --- a/src/modules/virtual/Timer/Timer.cpp +++ b/src/modules/virtual/Timer/Timer.cpp @@ -28,8 +28,8 @@ class Timer : public IoTItem { void doByInterval() { if (!_unfin && value.valD >= 0 && !_pause) { + if (_repeat && value.valD == 0) value.valD = _initValue; value.valD--; - if (_repeat && value.valD == -1) value.valD = _initValue; if (_needSave) needSave = true; if (value.valD == 0) { regEvent(value.valD, "Time's up");