From 5235bb67c1f3ca98768993677f7047efd6e832c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BB=D0=B8=D0=BC=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9=20=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5?= =?UTF-8?q?=D0=B2=D0=B8=D1=87?= Date: Fri, 17 Nov 2023 17:45:45 +0300 Subject: [PATCH] timed command fx --- lighthub/item.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lighthub/item.cpp b/lighthub/item.cpp index cce2f8f..0c868d9 100644 --- a/lighthub/item.cpp +++ b/lighthub/item.cpp @@ -916,6 +916,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion, bool authorized int res = -1; uint16_t status2Send = 0; uint8_t command2Set = 0; + itemCmd originalCmd = cmd; /// Common (GRP & NO GRP) commands switch (cmd.getCmd()) @@ -1071,7 +1072,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion, bool authorized if ((suffixCode==S_CMD) && cmd.isValue()) { - scheduleOppositeCommand(cmd,chActive,authorized); + scheduleOppositeCommand(originalCmd,chActive,authorized); scheduledOppositeCommand = true; } } @@ -1380,7 +1381,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion, bool authorized if (oppositeCommandToBeSchedulled) //invoked not as group part, delayed { - scheduleOppositeCommand(cmd,chActive,authorized); + scheduleOppositeCommand(originalCmd,chActive,authorized); status2Send &=~FLAG_PARAMETERS; } } // NO GROUP