aboutsummaryrefslogtreecommitdiffstats
path: root/mode-button-scheduler
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-06-12 20:34:20 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-06-12 20:34:20 +0200
commit44836ccf04b098d44b3e3f3a5f9b51b6bf1824fd (patch)
tree2b6ef72eaf62f4695b6988f821a03e7c6be79734 /mode-button-scheduler
parentfd2901cd45aac85e856b9892e1c8e67a644cd09d (diff)
mode-button-scheduler: beep for confirmation
But be silent if silent-boot is enabled.
Diffstat (limited to 'mode-button-scheduler')
-rw-r--r--mode-button-scheduler11
1 files changed, 10 insertions, 1 deletions
diff --git a/mode-button-scheduler b/mode-button-scheduler
index bce6089..dfd89da 100644
--- a/mode-button-scheduler
+++ b/mode-button-scheduler
@@ -14,5 +14,14 @@
/ system scheduler remove mode-button-scheduler;
:log info ("Acting on " . $Count . " mode-button presses: " . $Code);
-:delay 1s;
+
+:if ([ / system routerboard settings get silent-boot ] = false) do={
+ :for I from=1 to=$Count do={
+ :beep length=200ms;
+ :delay 200ms;
+ }
+} else={
+ :delay 1s;
+}
+
$Parsed;