Skip to content

Commit

Permalink
Add new gpiozero LED part
Browse files Browse the repository at this point in the history
  • Loading branch information
DocGarbanzo committed Sep 19, 2024
1 parent 405e559 commit d703b35
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions donkeycar/parts/led_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ def _update_continuous(self, mode=0):
if mode == 0:
self.pulse_color = ColorRGB.GREEN
elif mode == 1:
self.pulse_color = ColorRGB.YELLOW
self.pulse_color = ColorRGB.ORANGE
logger.info((f"Mode changed to {mode}"))
self.blink_continuous()
self.mode = mode

Expand All @@ -264,10 +265,10 @@ def run_threaded(self, mode=0, lap=False, wipe=False):
t = None
# 3 red blinks when lap or 1 violet blink when wiper
if lap:
logger.info(f"LEDStatusPi: Lap detected")
logger.info(f"Lap detected")
t = dict(on_color=ColorRGB.RED, on_time=0.2, off_time=0.2, n=3)
if wipe:
logger.info(f"LEDStatusPi: Wipe detected")
logger.info(f"Wipe detected")
t = dict(on_color=ColorRGB.PURPLE, on_time=0.1, off_time=0.1, n=4)
if t:
self.queue.put(t)
Expand Down

0 comments on commit d703b35

Please sign in to comment.