Extended and refactored library for BNO055, an intelligent 9-axis absolute orientation sensor by Bosch Sensortec. It includes ACC, MAG and GYRO sensors and Cortex-M0 processor.
Fork of BNO055_fusion by
Please note: pitch and roll in get_euler_angles are switched, the code should be like this:
h = dt[1] << 8 | dt[0]; r = dt[3] << 8 | dt[2]; p = dt[5] << 8 | dt[4];
See https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf
Diff: BNO055.h
- Revision:
- 10:63a9849f0e97
- Parent:
- 9:e7c8d34bf79a
- Child:
- 11:17bc36c5ccbb
diff -r e7c8d34bf79a -r 63a9849f0e97 BNO055.h --- a/BNO055.h Sun Jan 28 19:46:06 2018 +0000 +++ b/BNO055.h Sun Jan 28 20:55:10 2018 +0000 @@ -262,6 +262,26 @@ */ uint8_t write_reg1(uint8_t addr, uint8_t data); + /** Determine if degrees (instead of radians) are used. + * @return true if degrees are used + */ + bool use_degrees(); + + /** Determine if m/s*s (instead of mg) is used. + * @return true if m/s*s are used + */ + bool use_mss(); + + /** Determine if dps (instead of rds) are used. + * @return true if dps are used + */ + bool use_dps(); + + /** Determine if celsius (instead of fahrenheit) is used. + * @return true if celsius are used + */ + bool use_celsius(); + protected: void initialize(void); void get_id(void); @@ -288,6 +308,7 @@ uint8_t bootldr_rev_id; uint16_t sw_rev_id; + bool unit_flag_is_set(uint8_t flag); }; //---------------------------------------------------------