mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-12-08 20:39:01 +00:00
Remove incomplete TemperatureSensor for 1.0 release, close #93
This commit is contained in:
@@ -3,7 +3,7 @@ from __future__ import (
|
||||
print_function,
|
||||
absolute_import,
|
||||
division,
|
||||
)
|
||||
)
|
||||
|
||||
from .devices import (
|
||||
GPIODeviceClosed,
|
||||
@@ -16,7 +16,6 @@ from .input_devices import (
|
||||
Button,
|
||||
MotionSensor,
|
||||
LightSensor,
|
||||
TemperatureSensor,
|
||||
AnalogInputDevice,
|
||||
MCP3008,
|
||||
MCP3004,
|
||||
|
||||
@@ -12,7 +12,6 @@ from time import sleep, time
|
||||
from threading import Event
|
||||
|
||||
from RPi import GPIO
|
||||
from w1thermsensor import W1ThermSensor
|
||||
from spidev import SpiDev
|
||||
|
||||
from .devices import (
|
||||
@@ -499,15 +498,6 @@ LightSensor.wait_for_light = LightSensor.wait_for_active
|
||||
LightSensor.wait_for_dark = LightSensor.wait_for_inactive
|
||||
|
||||
|
||||
class TemperatureSensor(W1ThermSensor):
|
||||
"""
|
||||
A Digital Temperature Sensor.
|
||||
"""
|
||||
@property
|
||||
def value(self):
|
||||
return self.get_temperature()
|
||||
|
||||
|
||||
class AnalogInputDevice(CompositeDevice):
|
||||
"""
|
||||
Represents an analog input device connected to SPI (serial interface).
|
||||
@@ -606,4 +596,3 @@ class MCP3004(MCP3008):
|
||||
if not 0 <= channel < 4:
|
||||
raise InputDeviceError('channel must be between 0 and 3')
|
||||
super(MCP3004, self).__init__(device, channel)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import (
|
||||
print_function,
|
||||
absolute_import,
|
||||
division,
|
||||
)
|
||||
)
|
||||
|
||||
import warnings
|
||||
from time import sleep
|
||||
@@ -19,7 +19,7 @@ from .devices import (
|
||||
GPIOThread,
|
||||
CompositeDevice,
|
||||
SourceMixin,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class OutputDeviceError(GPIODeviceError):
|
||||
@@ -439,4 +439,3 @@ class Motor(SourceMixin, CompositeDevice):
|
||||
"""
|
||||
self._forward.off()
|
||||
self._backward.off()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user