RoboidControl-python/Things/TouchSensor.py

17 lines
525 B
Python

from Thing import Thing
class TouchSensor(Thing):
"""! A sensor which can detect touches
"""
def __init__(self, owner = None, parent = None):
"""! Create a touch sensor
"""
super().__init__(owner = owner, parent = parent)
## Value which is true when the sensor is touching something, false otherwise
self.touched_somthing = False
def ProcessBinary(bytes):
"""! Function to extract the touch state received in a binary message
"""
pass