Skip to content

Commit 6a614ac

Browse files
committed
Support for Geomagnetic Rotation Vector
1 parent 67e2941 commit 6a614ac

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ modeSleep KEYWORD2
2626
qToFloat KEYWORD2
2727

2828
enableRotationVector KEYWORD2
29+
enableGeomagneticRotationVector KEYWORD2
2930
enableGameRotationVector KEYWORD2
3031
enableARVRStabilizedRotationVector KEYWORD2
3132
enableARVRStabilizedGameRotationVector KEYWORD2

src/SparkFun_BNO08x_Arduino_Library.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,13 @@ bool BNO08x::enableRotationVector(uint16_t timeBetweenReports)
796796
return enableReport(SH2_ROTATION_VECTOR, timeBetweenReports);
797797
}
798798

799+
//Sends the packet to enable the geomagnetic rotation vector
800+
bool BNO08x::enableGeomagneticRotationVector(uint16_t timeBetweenReports)
801+
{
802+
timeBetweenReports = timeBetweenReports * 1000; // ms to us
803+
return enableReport(SH2_GEOMAGNETIC_ROTATION_VECTOR, timeBetweenReports);
804+
}
805+
799806
//Sends the packet to enable the ar/vr stabilized rotation vector
800807
bool BNO08x::enableARVRStabilizedRotationVector(uint16_t timeBetweenReports)
801808
{

src/SparkFun_BNO08x_Arduino_Library.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ class BNO08x
171171
float qToFloat(int16_t fixedPointValue, uint8_t qPoint); //Given a Q value, converts fixed point floating to regular floating point number
172172

173173
bool enableRotationVector(uint16_t timeBetweenReports = 10);
174+
bool enableGeomagneticRotationVector(uint16_t timeBetweenReports = 10);
174175
bool enableGameRotationVector(uint16_t timeBetweenReports = 10);
175176
bool enableARVRStabilizedRotationVector(uint16_t timeBetweenReports);
176177
bool enableARVRStabilizedGameRotationVector(uint16_t timeBetweenReports);

0 commit comments

Comments
 (0)