mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-04-25 08:23:53 +00:00
Merge pull request #166 from lurch/patch-2
Minor tweak to PWMOutputDevice.is_active
This commit is contained in:
@@ -368,7 +368,7 @@ class PWMOutputDevice(OutputDevice):
|
|||||||
Returns ``True`` if the device is currently active (:attr:`value` is
|
Returns ``True`` if the device is currently active (:attr:`value` is
|
||||||
non-zero) and ``False`` otherwise.
|
non-zero) and ``False`` otherwise.
|
||||||
"""
|
"""
|
||||||
return self.value > 0.0
|
return self.value != 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def frequency(self):
|
def frequency(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user