Skip to content

Commit

Permalink
Merge pull request #25 from peterhinch/issues_23_24
Browse files Browse the repository at this point in the history
Fix gyro scaling for degrees. Temperature is signed byte.
  • Loading branch information
tannewt authored Apr 29, 2019
2 parents f2f1468 + 789293d commit 32a5a8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_bno055.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class BNO055:
Driver for the BNO055 9DOF IMU sensor.
"""

temperature = _ReadOnlyUnaryStruct(0x34, 'B')
temperature = _ReadOnlyUnaryStruct(0x34, 'b')
"""Measures the temperature of the chip in degrees Celsius."""
accelerometer = _ScaledReadOnlyStruct(0x08, '<hhh', 1/100)
"""Gives the raw accelerometer readings, in m/s.
Expand All @@ -107,7 +107,7 @@ class BNO055:
other drivers too."""
magnetic = _ScaledReadOnlyStruct(0x0e, '<hhh', 1/16)
"""Gives the raw magnetometer readings in microteslas."""
gyroscope = _ScaledReadOnlyStruct(0x14, '<hhh', 1/900)
gyroscope = _ScaledReadOnlyStruct(0x14, '<hhh', 1/16)
"""Gives the raw gyroscope reading in degrees per second."""
euler = _ScaledReadOnlyStruct(0x1a, '<hhh', 1/16)
"""Gives the calculated orientation angles, in degrees."""
Expand Down

0 comments on commit 32a5a8a

Please sign in to comment.