diff --git a/stechuhr_client/client.py b/stechuhr_client/client.py index cc00bd81a1c59e1853e5e0391b58c9dde35dd740..b827f5cb419d67b977c6ae568373c2a78603db1d 100644 --- a/stechuhr_client/client.py +++ b/stechuhr_client/client.py @@ -98,14 +98,15 @@ def set_led(ledstate, config): LEDS.fill((0, 0, 0)) time.sleep(0.1) elif ledstate in ["error"]: - for i in range(3): + for i in range(6): LEDS.fill(config["led"]["failure_color"][0]) - time.sleep(1) + time.sleep(0.5) LEDS.fill((0, 0, 0)) - time.sleep(1) + time.sleep(0.5) # Return to default standby LED color in the end - LEDS.fill(config["led"]["standby_color"][0]) + if not ledstate in ["error"]: + LEDS.fill(config["led"]["standby_color"][0]) def dispatch_buzzer(state, config): @@ -192,7 +193,7 @@ def process_request(output_queue, config=None, logger=None): while not reached: dispatch_led("error", config) try: - r = requests.get(url, timeout=config["server"]["timout"]) + r = requests.get(url, timeout=config["server"]["timeout"]) if r.ok: reached == True else: