Return the accelerometer position in degrees between -90 and 90

This commit is contained in:
Fabio Manganiello 2018-09-06 02:18:08 +02:00
parent b3f20ca0de
commit 96157a31bf

View file

@ -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: