mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-14 21:10:11 +01:00
LED setting
set led to notice state when init. After all init done, change to OK state
This commit is contained in:
parent
ce64054ddd
commit
62a27eef77
2 changed files with 16 additions and 1 deletions
15
peripheral_manager/files/etc/init.d/peripheral_led_normal
Executable file
15
peripheral_manager/files/etc/init.d/peripheral_led_normal
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
|
||||
USE_PROCD=0
|
||||
NAME=peripheral_led_normal
|
||||
|
||||
start_service() {
|
||||
ubus -t 2 wait_for led.status
|
||||
ubus call led.status set '{"state":"ok"}'
|
||||
ubus -t 2 wait_for button
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ start_service() {
|
|||
|
||||
service_running() {
|
||||
ubus -t 2 wait_for led.status
|
||||
ubus call led.status set '{"state":"ok"}'
|
||||
ubus call led.status set '{"state":"notice"}'
|
||||
ubus -t 2 wait_for button
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue