From 2a8a3f4394863ae9fa27c64fd4bbcb8065042795 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 31 Mar 2023 14:26:14 +0200 Subject: [PATCH] Removed legacy sensor.distance.vl53l1x backend --- .../sensor/distance/vl53l1x/__init__.py | 39 ------------------- .../sensor/distance/vl53l1x/manifest.yaml | 14 ------- 2 files changed, 53 deletions(-) delete mode 100644 platypush/backend/sensor/distance/vl53l1x/__init__.py delete mode 100644 platypush/backend/sensor/distance/vl53l1x/manifest.yaml diff --git a/platypush/backend/sensor/distance/vl53l1x/__init__.py b/platypush/backend/sensor/distance/vl53l1x/__init__.py deleted file mode 100644 index 45408f2a5..000000000 --- a/platypush/backend/sensor/distance/vl53l1x/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -from platypush.backend.sensor import SensorBackend - - -class SensorDistanceVl53L1XBackend(SensorBackend): - """ - Backend to poll an `VL53L1x `_ - laser ranger/distance sensor - - Requires: - - * ``smbus2`` (``pip install smbus2``) - * ``vl53l1x`` (``pip install vl53l1x``) - - Triggers: - - * :class:`platypush.message.event.sensor.SensorDataChangeEvent` if the measurements of a sensor have changed - * :class:`platypush.message.event.sensor.SensorDataAboveThresholdEvent` if the measurements of a sensor have - gone above a configured threshold - * :class:`platypush.message.event.sensor.SensorDataBelowThresholdEvent` if the measurements of a sensor have - gone below a configured threshold - - """ - - def __init__(self, short=True, medium=False, long=False, **kwargs): - """ - :param short: Enable short range measurement (default: True) - :param medium: Enable medium range measurement (default: False) - :param long: Enable long range measurement (default: False) - """ - enabled_sensors = { - 'short': short, - 'medium': medium, - 'long': long, - } - - super().__init__(plugin='gpio.sensor.distance.vl53l1x', enabled_sensors=enabled_sensors, **kwargs) - - -# vim:sw=4:ts=4:et: diff --git a/platypush/backend/sensor/distance/vl53l1x/manifest.yaml b/platypush/backend/sensor/distance/vl53l1x/manifest.yaml deleted file mode 100644 index 8150eec96..000000000 --- a/platypush/backend/sensor/distance/vl53l1x/manifest.yaml +++ /dev/null @@ -1,14 +0,0 @@ -manifest: - events: - platypush.message.event.sensor.SensorDataAboveThresholdEvent: if the measurements - of a sensor havegone above a configured threshold - platypush.message.event.sensor.SensorDataBelowThresholdEvent: if the measurements - of a sensor havegone below a configured threshold - platypush.message.event.sensor.SensorDataChangeEvent: if the measurements of a - sensor have changed - install: - pip: - - smbus2 - - vl53l1x - package: platypush.backend.sensor.distance.vl53l1x - type: backend