aboutsummaryrefslogtreecommitdiffstats
path: root/mode-button.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-11-14 22:36:58 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-11-14 22:36:58 +0100
commit3aec5d70c628003634fc413cdb00b2e1e0c9fca5 (patch)
tree1f00be1798a0a39e578f6f0af1d68bc68cd16d9d /mode-button.rsc
parent0d530294f5f0608114c8f0cd409f0041bb2c1b74 (diff)
parent8c8f834179f0ab618f031ec50739bbafd4c4261e (diff)
Merge branch 'scheduler' into nextrouteros-7.13beta1-1
Diffstat (limited to 'mode-button.rsc')
-rw-r--r--mode-button.rsc10
1 files changed, 5 insertions, 5 deletions
diff --git a/mode-button.rsc b/mode-button.rsc
index 87e8740..dae9d99 100644
--- a/mode-button.rsc
+++ b/mode-button.rsc
@@ -16,10 +16,10 @@
:set ($ModeButton->"count") ($ModeButton->"count" + 1);
-:local Scheduler [ /system/scheduler/find where name="\$ModeButtonScheduler" ];
+:local Scheduler [ /system/scheduler/find where name="_ModeButtonScheduler" ];
:if ([ :len $Scheduler ] = 0) do={
- $LogPrintExit2 info $0 ("Creating scheduler \$ModeButtonScheduler, counting presses...") false;
+ $LogPrintExit2 info $0 ("Creating scheduler _ModeButtonScheduler, counting presses...") false;
:global ModeButtonScheduler do={
:global ModeButton;
@@ -44,7 +44,7 @@
:set ($ModeButton->"count") 0;
:set ModeButtonScheduler;
- /system/scheduler/remove [ find where name=$0 ];
+ /system/scheduler/remove [ find where name="_ModeButtonScheduler" ];
:if ([ :len $Code ] > 0) do={
:if ([ $ValidateSyntax $Code ] = true) do={
@@ -68,9 +68,9 @@
$LogPrintExit2 info $0 ("No action defined for " . $Count . " mode-button presses.") false;
}
}
- /system/scheduler/add name="\$ModeButtonScheduler" \
+ /system/scheduler/add name="_ModeButtonScheduler" \
on-event=":global ModeButtonScheduler; \$ModeButtonScheduler;" interval=3s;
} else={
- $LogPrintExit2 debug $0 ("Updating scheduler \$ModeButtonScheduler...") false;
+ $LogPrintExit2 debug $0 ("Updating scheduler _ModeButtonScheduler...") false;
/system/scheduler/set $Scheduler start-time=[ /system/clock/get time ];
}