changed absolute path to current location
This commit is contained in:
parent
e72fffb600
commit
a5faeec127
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import pifacecommon.mcp23s17
|
||||||
import time
|
import time
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
button_count = 2
|
button_count = 2
|
||||||
longpress_delay = 0.4
|
longpress_delay = 0.4
|
||||||
|
@ -78,7 +79,7 @@ def switch_longpressed(event):
|
||||||
event.chip.output_pins[event.pin_num].toggle()
|
event.chip.output_pins[event.pin_num].toggle()
|
||||||
elif pin_shortpress_count[event.pin_num] == 2:
|
elif pin_shortpress_count[event.pin_num] == 2:
|
||||||
if event.pin_num == 0:
|
if event.pin_num == 0:
|
||||||
call(["/root/chch-power/light.sh"])
|
call(["/home/automation/chch-power/light.sh"])
|
||||||
chch_status_output(event.chip)
|
chch_status_output(event.chip)
|
||||||
|
|
||||||
# switch all power off with a very long press
|
# switch all power off with a very long press
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue