Merge branch 'master' into when-active-when-inactive

Conflicts:
	gpiozero/devices.py
	gpiozero/input_devices.py
This commit is contained in:
Dave Jones
2015-09-22 12:52:30 +01:00
5 changed files with 124 additions and 4 deletions

View File

@@ -128,6 +128,7 @@ class SmoothedInputDevice(WaitableInputDevice):
def _get_threshold(self):
return self._threshold
def _set_threshold(self, value):
if not (0.0 < value < 1.0):
raise InputDeviceError('threshold must be between zero and one exclusive')
@@ -208,6 +209,7 @@ class LightSensor(SmoothedInputDevice):
wait_for_dark = _alias('wait_for_inactive')
class TemperatureSensor(W1ThermSensor):
@property
def value(self):