fix
This commit is contained in:
1 parent
98afafd0e4
commit
76d7614a8d
1 file changed
+1
-1
+1
-1
@@ -159,7 +159,7 @@ try:
|
|||||||
while True:
|
while True:
|
||||||
for _station in stations:
|
for _station in stations:
|
||||||
# new_input_state = GPIO.input(_station['button'])
|
# 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.
|
# Al pulsar el interruptor cambia el estado.
|
||||||
elapsed_time = time.clock_gettime(time.CLOCK_MONOTONIC) - _station['button state changed time']
|
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:
|
if new_input_state != _station['old button state'] and elapsed_time > 0.2:
|
||||||
|
|||||||
Reference in new issue
Block a user