This commit is contained in:
2024-03-02 19:09:42 +01:00
parent 98afafd0e4
commit 76d7614a8d

View File

@@ -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: