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
Revision 8:77cd45916596, committed 2015-05-13
- Comitter:
- Alex Young
- Date:
- Wed May 13 15:32:21 2015 +0200
- Parent:
- 7:c913a7cd5231
- Child:
- 9:e4dc986e59f6
- Commit message:
- Clean up formatting of output data.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed May 13 14:53:07 2015 +0200
+++ b/main.cpp Wed May 13 15:32:21 2015 +0200
@@ -24,24 +24,24 @@
{
if (mid == MTDATA2_MESSAGE_ID)
{
- pc.printf("Data packet received\n");
+ pc.printf("MTData2:");
uint16_t counter;
if (MtData2_getItem(&counter, XDI_PacketCounter, data, dataLength))
{
- pc.printf("\tPacket counter:\t%d\n", counter);
+ pc.printf(" Packet counter: %5d", counter);
}
float ori[4];
if (MtData2_getItem(ori, XDI_Quaternion, data, dataLength))
{
- pc.printf("\tOrientation\t%.3f, %.3f, %.3f, %.3f\n", ori[0], ori[1],
+ pc.printf(" Orientation: (% .3f, % .3f, % .3f, % .3f)", ori[0], ori[1],
ori[2], ori[3]);
}
uint32_t status;
if (MtData2_getItem(&status, XDI_StatusWord, data, dataLength))
{
- pc.printf("\tFilter status:\t%d\n", status);
+ pc.printf(" Status:%X", status);
}
- pc.printf("\n\n");
+ pc.printf("\n");
}
else
{
@@ -49,7 +49,6 @@
}
}
-
static void configureSerialPorts(void)
{
pc.baud(921600);

Xsens MTi 1-series