2019-12-22 19:09:02 +01:00
|
|
|
from platypush.message.event import Event
|
|
|
|
|
|
|
|
|
|
|
|
class DistanceSensorEvent(Event):
|
|
|
|
"""
|
|
|
|
Event triggered when a new value is processed by a distance sensor.
|
|
|
|
"""
|
|
|
|
def __init__(self, distance: float, unit: str = 'mm', *args, **kwargs):
|
2019-12-22 19:38:01 +01:00
|
|
|
super().__init__(*args, distance=distance, unit=unit, disable_logging=True,
|
|
|
|
disable_web_clients_notification=True, **kwargs)
|
2019-12-22 19:09:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
# vim:sw=4:ts=4:et:
|