aboutsummaryrefslogtreecommitdiffstats
path: root/mode-button-event
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-10-16 08:24:19 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-10-16 08:24:19 +0200
commit8b2df7abd071b75b19df8564cece0a23c18c7894 (patch)
treea7ac3ef779dc2a2e503f74052801072d5505b230 /mode-button-event
parent1c4531d5369ac1b8e502539faf65274a60c268d2 (diff)
mode-button: merge mode-button-event & mode-button-schedulerchange-32
Diffstat (limited to 'mode-button-event')
-rw-r--r--mode-button-event20
1 files changed, 1 insertions, 19 deletions
diff --git a/mode-button-event b/mode-button-event
index 7039852..b31ddc3 100644
--- a/mode-button-event
+++ b/mode-button-event
@@ -1,24 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mode-button-event
-# Copyright (c) 2018-2020 Christian Hesse <mail@eworm.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
-#
-# run on mode-button event and count button presses
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/mode-button.md
-
-:global ModeButton;
:global LogPrintExit;
-:set ($ModeButton->"count") ($ModeButton->"count" + 1);
-
-:local Scheduler [ / system scheduler find where name="mode-button-scheduler" ];
-
-:if ([ :len $Scheduler ] = 0) do={
- $LogPrintExit info ("Creating mode-button scheduler, counting presses...") false;
- / system scheduler add name="mode-button-scheduler" \
- on-event="/ system script run mode-button-scheduler;" interval=3s;
-} else={
- $LogPrintExit debug ("Updating mode-button-scheduler...") false;
- / system scheduler set $Scheduler start-time=[ /system clock get time ];
-}
+$LogPrintExit warning ("This script's functionality has been merged into 'mode-button'.") true;