From c133110ab9860ad0058a571ea1adfc099bb15b3a Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Wed, 3 Feb 2016 01:01:54 +0000 Subject: [PATCH] Add PWMOutputDevice.pulse method ...which simply calls blink with different default arguments --- gpiozero/output_devices.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpiozero/output_devices.py b/gpiozero/output_devices.py index 13d5ad4..5e05a25 100644 --- a/gpiozero/output_devices.py +++ b/gpiozero/output_devices.py @@ -420,6 +420,11 @@ class PWMOutputDevice(OutputDevice): self._blink_thread.join() self._blink_thread = None + def pulse( + self, on_time=0, off_time=0, fade_in_time=1, fade_out_time=1, + n=None, background=True): + self.blink(on_time, off_time, fade_in_time, fade_out_time, n, background) + def _stop_blink(self): if self._blink_thread: self._blink_thread.stop()