Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-rtos mbed Xbus
Fork of MTi-1_example by
Diff: main.cpp
- Revision:
- 42:e70756d2d8bc
- Parent:
- 41:504b6821a96f
- Child:
- 43:470c019246e4
diff -r 504b6821a96f -r e70756d2d8bc main.cpp
--- a/main.cpp Thu May 21 14:41:44 2015 +0200
+++ b/main.cpp Thu May 21 15:21:02 2015 +0200
@@ -163,6 +163,21 @@
pc.printf(" Orientation: (% .3f, % .3f, % .3f, % .3f)", ori[0], ori[1],
ori[2], ori[3]);
}
+ float acc[3];
+ if (XbusMessage_getDataItem(acc, XDI_Acceleration, message))
+ {
+ pc.printf(" Acceleration: (% .3f, % .3f, % .3f)", acc[0], acc[1], acc[2]);
+ }
+ float gyr[3];
+ if (XbusMessage_getDataItem(gyr, XDI_RateOfTurn, message))
+ {
+ pc.printf(" Rate Of Turn: (% .3f, % .3f, % .3f)", gyr[0], gyr[1], gyr[2]);
+ }
+ float mag[3];
+ if (XbusMessage_getDataItem(mag, XDI_MagneticField, message))
+ {
+ pc.printf(" Magnetic Field: (% .3f, % .3f, % .3f)", mag[0], mag[1], mag[2]);
+ }
uint32_t status;
if (XbusMessage_getDataItem(&status, XDI_StatusWord, message))
{

Xsens MTi 1-series