fixed bug
This commit is contained in:
parent
39886682b4
commit
2efcdef135
|
@ -37,7 +37,6 @@ inter_press_max_delay = 1
|
|||
pin_last_rise_date = [0]*button_count
|
||||
pin_last_shortpress = [0]*button_count
|
||||
pin_shortpress_count = [0]*button_count
|
||||
pifacedigital = pifacedigitalio.PiFaceDigital()
|
||||
|
||||
def chch_status_output(pfd):
|
||||
f = open("/tmp/status", 'w')
|
||||
|
@ -110,7 +109,7 @@ def switch_shortpressed(event):
|
|||
print(["count:", pin_shortpress_count[event.pin_num]])
|
||||
|
||||
if __name__ == "__main__":
|
||||
listener = pifacedigitalio.InputEventListener(chip=pifacedigital)
|
||||
listener = pifacedigitalio.InputEventListener()
|
||||
for i in range(button_count):
|
||||
listener.register(i, pifacedigitalio.IODIR_ON, switch_pressed)
|
||||
listener.register(i, pifacedigitalio.IODIR_OFF, switch_unpressed)
|
||||
|
|
Loading…
Reference in New Issue