fix
This commit is contained in:
@@ -159,7 +159,7 @@ try:
|
||||
while True:
|
||||
for _station in stations:
|
||||
# new_input_state = GPIO.input(_station['button'])
|
||||
new_input_state = station['btn'].is_pressed
|
||||
new_input_state = _station['btn'].is_pressed
|
||||
# Al pulsar el interruptor cambia el estado.
|
||||
elapsed_time = time.clock_gettime(time.CLOCK_MONOTONIC) - _station['button state changed time']
|
||||
if new_input_state != _station['old button state'] and elapsed_time > 0.2:
|
||||
|
||||
Reference in New Issue
Block a user