Skip to content
Snippets Groups Projects
Commit 8dcb60a7 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Fix error in deadmanswitch

parent 927427ff
Branches
No related tags found
No related merge requests found
...@@ -98,13 +98,14 @@ def set_led(ledstate, config): ...@@ -98,13 +98,14 @@ def set_led(ledstate, config):
LEDS.fill((0, 0, 0)) LEDS.fill((0, 0, 0))
time.sleep(0.1) time.sleep(0.1)
elif ledstate in ["error"]: elif ledstate in ["error"]:
for i in range(3): for i in range(6):
LEDS.fill(config["led"]["failure_color"][0]) LEDS.fill(config["led"]["failure_color"][0])
time.sleep(1) time.sleep(0.5)
LEDS.fill((0, 0, 0)) LEDS.fill((0, 0, 0))
time.sleep(1) time.sleep(0.5)
# Return to default standby LED color in the end # Return to default standby LED color in the end
if not ledstate in ["error"]:
LEDS.fill(config["led"]["standby_color"][0]) LEDS.fill(config["led"]["standby_color"][0])
...@@ -192,7 +193,7 @@ def process_request(output_queue, config=None, logger=None): ...@@ -192,7 +193,7 @@ def process_request(output_queue, config=None, logger=None):
while not reached: while not reached:
dispatch_led("error", config) dispatch_led("error", config)
try: try:
r = requests.get(url, timeout=config["server"]["timout"]) r = requests.get(url, timeout=config["server"]["timeout"])
if r.ok: if r.ok:
reached == True reached == True
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment