From 76d7614a8d700d8e1cad6da56cc89d480b5a5b52 Mon Sep 17 00:00:00 2001 From: Eneko Date: Sat, 2 Mar 2024 19:09:42 +0100 Subject: [PATCH] fix --- intercom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intercom.py b/intercom.py index 8e4723a..bdd4285 100644 --- a/intercom.py +++ b/intercom.py @@ -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: