aboutsummaryrefslogtreecommitdiffstats
path: root/mode-button
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-10-22 22:18:22 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-10-22 22:18:22 +0200
commitdd39049d36a4ec34c6bc11936c3f680cd31b24c9 (patch)
tree56d7d0c33dab3bc9b0436b106dc74a5f0a14a8aa /mode-button
parent4af1f5dec2cb8c7b94b3fff141cab63b2adae725 (diff)
mode-button: use user-led for visual feeback
The user-led needs to be configured with type=off, it is ignored with other configuration.
Diffstat (limited to 'mode-button')
-rw-r--r--mode-button10
1 files changed, 6 insertions, 4 deletions
diff --git a/mode-button b/mode-button
index 242cb46..3aee63e 100644
--- a/mode-button
+++ b/mode-button
@@ -32,13 +32,15 @@
:if ([ :len $Code ] > 0) do={
$LogPrintExit info ("Acting on " . $Count . " mode-button presses: " . $Code) false;
- :if ([ / system routerboard settings get silent-boot ] = false) do={
- :for I from=1 to=$Count do={
+ :for I from=1 to=$Count do={
+ / system leds set type=on [ find where leds="user-led" type=off ];
+ :if ([ / system routerboard settings get silent-boot ] = false) do={
:beep length=200ms;
+ } else={
:delay 200ms;
}
- } else={
- :delay 1s;
+ / system leds set type=off [ find where leds="user-led" type=on ];
+ :delay 200ms;
}
[ :parse $Code ];