Skip to content

Commit

Permalink
Merge pull request #106 from scls19fr/patch-1
Browse files Browse the repository at this point in the history
Stop blinking shouldn't always switch off led

Thanks @scls19fr
  • Loading branch information
Vido committed Nov 30, 2015
2 parents 8843250 + 1803a81 commit 808c355
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pingo/parts/led.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def __init__(self, led, times, on_delay, off_delay):
:param off_delay: delay while LED is off
"""
self.led = led
self.led_pin_state_initial = self.led.pin.state
self.active = True
self.forever = times == 0
self.times_remaining = times
Expand All @@ -143,7 +144,7 @@ def run(self):
else:
time.sleep(self.off_delay)
else:
self.led.off()
self.led.pin.state = self.led_pin_state_initial
self.active = False


Expand Down

0 comments on commit 808c355

Please sign in to comment.