From 96157a31bfeb9a304d83340f6ad03b388b98d042 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 6 Sep 2018 02:18:08 +0200 Subject: [PATCH] Return the accelerometer position in degrees between -90 and 90 --- platypush/plugins/gpio/sensor/accelerometer/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/gpio/sensor/accelerometer/__init__.py b/platypush/plugins/gpio/sensor/accelerometer/__init__.py index 0b96e42019..6f3c7ee220 100644 --- a/platypush/plugins/gpio/sensor/accelerometer/__init__.py +++ b/platypush/plugins/gpio/sensor/accelerometer/__init__.py @@ -47,10 +47,10 @@ class GpioSensorAccelerometerPlugin(GpioSensorPlugin): """ Extends :func:`.GpioSensorPlugin.get_measurement` - :returns: The sensor's current position as a list with three elements (x,y,z) + :returns: The sensor's current position as a list with the three components (x,y,z) in degrees, each between -90 and 90 """ - return [self.sensor.getX(), self.sensor.getY(), self.sensor.getZ()] + return [self.sensor.getX()*100, self.sensor.getY()*100, self.sensor.getZ()*100] # vim:sw=4:ts=4:et: