mirror of
https://github.com/srlabs/blue-merle.git
synced 2024-12-22 21:59:25 -05:00
switch: show a message on toggling the button
To see more easily whether we have control.
This commit is contained in:
parent
119a287304
commit
259bffc515
@ -1,16 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/functions/gl_util.sh
|
||||||
|
|
||||||
action=$1
|
action=$1
|
||||||
|
|
||||||
logger -p notice -t blue-merle-toggle "Called... ${action}"
|
logger -p notice -t blue-merle-toggle "Called... ${action}"
|
||||||
|
|
||||||
if [ "$action" = "on" ];then
|
if [ "$action" = "on" ];then
|
||||||
|
mcu_send_message "Blue Merle ${action}"
|
||||||
echo "on" > /tmp/sim_change_switch
|
echo "on" > /tmp/sim_change_switch
|
||||||
|
|
||||||
elif [ "$action" = "off" ];then
|
elif [ "$action" = "off" ];then
|
||||||
|
mcu_send_message "Blue Merle ${action}"
|
||||||
echo "off" > /tmp/sim_change_switch
|
echo "off" > /tmp/sim_change_switch
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "off" > /tmp/sim_change_switch
|
echo "off" > /tmp/sim_change_switch
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user