Skip to content

Commit

Permalink
temp removed button press LED feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
elschnorro77 authored Apr 5, 2020
1 parent 66fe3a4 commit bcf924a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit bcf924a

Please sign in to comment.