Skip to content

Commit

Permalink
Merge pull request #35 from caternuson/iss34
Browse files Browse the repository at this point in the history
Change to gyro and rads/sec
  • Loading branch information
ladyada committed Sep 9, 2019
2 parents cc0b08c + d3bd4e7 commit d3edbc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion adafruit_bno055.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ class BNO055:
magnetic = _ScaledReadOnlyStruct(0x0e, '<hhh', 1/16)
"""Gives the raw magnetometer readings in microteslas."""
gyroscope = _ScaledReadOnlyStruct(0x14, '<hhh', 1/16)
"""Gives the raw gyroscope reading in degrees per second."""
"""Gives the raw gyroscope reading in degrees per second.
.. warning:: This is deprecated. Use ``gyro`` instead. It'll work with
other drivers too."""
gyro = _ScaledReadOnlyStruct(0x14, '<hhh', 0.001090830782496456)
"""Gives the raw gyroscope reading in radians per second."""
euler = _ScaledReadOnlyStruct(0x1a, '<hhh', 1/16)
"""Gives the calculated orientation angles, in degrees."""
quaternion = _ScaledReadOnlyStruct(0x20, '<hhhh', 1/(1<<14))
Expand Down
2 changes: 1 addition & 1 deletion examples/bno055_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
print('Temperature: {} degrees C'.format(sensor.temperature))
print('Accelerometer (m/s^2): {}'.format(sensor.accelerometer))
print('Magnetometer (microteslas): {}'.format(sensor.magnetometer))
print('Gyroscope (deg/sec): {}'.format(sensor.gyroscope))
print('Gyroscope (rad/sec): {}'.format(sensor.gyro))
print('Euler angle: {}'.format(sensor.euler))
print('Quaternion: {}'.format(sensor.quaternion))
print('Linear acceleration (m/s^2): {}'.format(sensor.linear_acceleration))
Expand Down

0 comments on commit d3edbc3

Please sign in to comment.