From f0ea1627f7b9e9a9deb084b5894f0036fda4670e Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Sun, 7 Feb 2016 22:51:41 +0000 Subject: [PATCH] Fix #167 --- gpiozero/boards.py | 4 ++-- gpiozero/output_devices.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gpiozero/boards.py b/gpiozero/boards.py index 635690a..6e35725 100644 --- a/gpiozero/boards.py +++ b/gpiozero/boards.py @@ -140,7 +140,7 @@ class LEDBoard(SourceMixin, CompositeDevice): raise ValueError('fade_out_time must be 0 with non-PWM LEDs') self._stop_blink() self._blink_thread = GPIOThread( - target=self._blink_leds, + target=self._blink_device, args=(on_time, off_time, fade_in_time, fade_out_time, n) ) self._blink_thread.start() @@ -153,7 +153,7 @@ class LEDBoard(SourceMixin, CompositeDevice): self._blink_thread.stop() self._blink_thread = None - def _blink_leds(self, on_time, off_time, fade_in_time, fade_out_time, n, fps=50): + def _blink_device(self, on_time, off_time, fade_in_time, fade_out_time, n, fps=50): sequence = [] if fade_in_time > 0: sequence += [ diff --git a/gpiozero/output_devices.py b/gpiozero/output_devices.py index 13d5ad4..0458aeb 100644 --- a/gpiozero/output_devices.py +++ b/gpiozero/output_devices.py @@ -166,7 +166,7 @@ class DigitalOutputDevice(OutputDevice): """ self._stop_blink() self._blink_thread = GPIOThread( - target=self._blink_led, args=(on_time, off_time, n) + target=self._blink_device, args=(on_time, off_time, n) ) self._blink_thread.start() if not background: @@ -178,7 +178,7 @@ class DigitalOutputDevice(OutputDevice): self._blink_thread.stop() self._blink_thread = None - def _blink_led(self, on_time, off_time, n): + def _blink_device(self, on_time, off_time, n): iterable = repeat(0) if n is None else repeat(0, n) for i in iterable: self._write(True) @@ -412,7 +412,7 @@ class PWMOutputDevice(OutputDevice): """ self._stop_blink() self._blink_thread = GPIOThread( - target=self._blink_led, + target=self._blink_device, args=(on_time, off_time, fade_in_time, fade_out_time, n) ) self._blink_thread.start() @@ -425,7 +425,7 @@ class PWMOutputDevice(OutputDevice): self._blink_thread.stop() self._blink_thread = None - def _blink_led( + def _blink_device( self, on_time, off_time, fade_in_time, fade_out_time, n, fps=50): sequence = [] if fade_in_time > 0: