From bcf924af0cc440fc07e6e989e6185147bc366952 Mon Sep 17 00:00:00 2001 From: elschnorro77 <57951003+elschnorro77@users.noreply.github.com> Date: Sun, 5 Apr 2020 15:46:20 +0200 Subject: [PATCH] temp removed button press LED feedback --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a8629f1..9e2f004 100644 --- a/main.py +++ b/main.py @@ -80,7 +80,9 @@ def button_pressed(channel): def button_pressed_rising(): global time_rising, GPIO_LED, LED_STATE time_rising = miliseconds() - toggle_led(GPIO_LED, LED_STATE) + if debug: + print("button_pressed_rising") + #toggle_led(GPIO_LED, LED_STATE) def button_pressed_falling(): global time_rising, debug, GPIO_LED, LED_STATE @@ -89,7 +91,9 @@ def button_pressed_falling(): time_rising = 0 # reset to prevent multiple fallings from the same rising MIN_TIME_TO_ELAPSE = 500 # miliseconds MAX_TIME_TO_ELAPSE = 3000 - toggle_led(GPIO_LED, LED_STATE) + if debug: + print("button_pressed_falling") + #toggle_led(GPIO_LED, LED_STATE) if time_elapsed >= MIN_TIME_TO_ELAPSE and time_elapsed <= MAX_TIME_TO_ELAPSE: # normal button press to switch between measurement and maintenance toggle_measurement()