mirror of
https://github.com/srlabs/blue-merle.git
synced 2024-12-22 05:44:59 -05:00
switch: attempt to react to the hardware button
I don't know whether this works. On the v4 firmware, we can see files in /etc/gl-switch.d but I don't know yet how the system determines which file to choose. I assume it's dependend on the "page" of the display. But I haven't figured out yet how or rather where those pages are organised.
This commit is contained in:
parent
1a17e06a12
commit
843ddf9e7d
14
files/etc/gl-switch.d/sim.sh
Normal file
14
files/etc/gl-switch.d/sim.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
action=$1
|
||||
|
||||
if [ "$action" = "on" ];then
|
||||
echo "on" > /tmp/sim_change_switch
|
||||
|
||||
elif [ "$action" = "off" ];then
|
||||
echo "off" > /tmp/sim_change_switch
|
||||
else
|
||||
echo "off" > /tmp/sim_change_switch
|
||||
fi
|
||||
sleep 1
|
||||
|
Loading…
Reference in New Issue
Block a user