Nikola Milenic / bno055

Dependents:   MSPDFW

Files at this revision

API Documentation at this revision

Comitter:
milenicnikola
Date:
Wed Jun 12 21:48:44 2019 +0000
Parent:
0:52d78f7d0ede
Commit message:
Init

Changed in this revision

bno055.cpp Show annotated file Show diff for this revision Revisions of this file
bno055.h Show annotated file Show diff for this revision Revisions of this file
diff -r 52d78f7d0ede -r 2015b07f1b33 bno055.cpp
--- a/bno055.cpp	Wed Dec 26 21:11:24 2018 +0000
+++ b/bno055.cpp	Wed Jun 12 21:48:44 2019 +0000
@@ -115,6 +115,11 @@
     op_mode = omode;
 }
 
+char BNO055::getmode(){
+    readchar(BNO055_OPR_MODE_ADDR);
+    return rx;
+}
+
 void BNO055::setpowermode(char pmode){
     writechar(BNO055_PWR_MODE_ADDR,pmode);
     pwr_mode = pmode;
diff -r 52d78f7d0ede -r 2015b07f1b33 bno055.h
--- a/bno055.h	Wed Dec 26 21:11:24 2018 +0000
+++ b/bno055.h	Wed Jun 12 21:48:44 2019 +0000
@@ -207,6 +207,8 @@
     range 0-7, any value outside this will set the orientation to P1 (default at power up) **/
     void set_mapping(char orient);
     
+/** Get the current operation mode of the sensor **/
+    char getmode(void);
 /** Get the current values from the accelerometer **/
     void get_accel(void);
 /** Get the current values from the gyroscope **/