From 40905702782f1e13840d942752904148ea438363 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 20 Dec 2019 21:24:47 +0100 Subject: [PATCH] GpioSensorDistancePlugin should extend GpioPlugin --- platypush/plugins/gpio/sensor/__init__.py | 2 +- platypush/plugins/gpio/sensor/distance/__init__.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platypush/plugins/gpio/sensor/__init__.py b/platypush/plugins/gpio/sensor/__init__.py index 025819f18..c747b14d3 100644 --- a/platypush/plugins/gpio/sensor/__init__.py +++ b/platypush/plugins/gpio/sensor/__init__.py @@ -36,5 +36,5 @@ class GpioSensorPlugin(Plugin): return self.get_measurement(*args, **kwargs).output -# vim:sw=4:ts=4:et: +# vim:sw=4:ts=4:et: diff --git a/platypush/plugins/gpio/sensor/distance/__init__.py b/platypush/plugins/gpio/sensor/distance/__init__.py index 1e86b608b..1096eac06 100644 --- a/platypush/plugins/gpio/sensor/distance/__init__.py +++ b/platypush/plugins/gpio/sensor/distance/__init__.py @@ -1,10 +1,11 @@ import time from platypush.plugins import action +from platypush.plugins.gpio import GpioPlugin from platypush.plugins.gpio.sensor import GpioSensorPlugin -class GpioSensorDistancePlugin(GpioSensorPlugin): +class GpioSensorDistancePlugin(GpioPlugin, GpioSensorPlugin): """ You can use this plugin to interact with a distance sensor on your Raspberry Pi (tested with a HC-SR04 ultrasound sensor). @@ -24,7 +25,7 @@ class GpioSensorDistancePlugin(GpioSensorPlugin): """ import RPi.GPIO as gpio - super().__init__(*args, **kwargs) + GpioPlugin.__init__(self, *args, **kwargs) self.trigger_pin = trigger_pin self.echo_pin = echo_pin @@ -88,4 +89,3 @@ class GpioSensorDistancePlugin(GpioSensorPlugin): # vim:sw=4:ts=4:et: -