Return the accelerometer position in degrees between -90 and 90
This commit is contained in:
parent
b3f20ca0de
commit
96157a31bf
1 changed files with 2 additions and 2 deletions
|
@ -47,10 +47,10 @@ class GpioSensorAccelerometerPlugin(GpioSensorPlugin):
|
||||||
"""
|
"""
|
||||||
Extends :func:`.GpioSensorPlugin.get_measurement`
|
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:
|
# vim:sw=4:ts=4:et:
|
||||||
|
|
Loading…
Reference in a new issue