From 29ca48d2a7b33199f8174588de6676a3b5e9eff5 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Wed, 3 Feb 2016 03:34:12 +0000 Subject: [PATCH] Minor tweak to PWMOutputDevice.is_active ...so that its implementation is more consistent with the other is_active methods --- gpiozero/output_devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpiozero/output_devices.py b/gpiozero/output_devices.py index 13d5ad4..4a3b1f7 100644 --- a/gpiozero/output_devices.py +++ b/gpiozero/output_devices.py @@ -368,7 +368,7 @@ class PWMOutputDevice(OutputDevice): Returns ``True`` if the device is currently active (:attr:`value` is non-zero) and ``False`` otherwise. """ - return self.value > 0.0 + return self.value != 0 @property def frequency(self):