kjj

Dependencies:   mbed-rtos mbed Xbus

Fork of MTi-1_example by Xsens

Revision:
42:e70756d2d8bc
Parent:
41:504b6821a96f
Child:
43:470c019246e4
--- 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))
 	{