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: CAMCTL MTRCTL SRVCTL mbed FXOS8700CQ XBEE
Diff: main.cpp
- Revision:
- 2:c878e4203b62
- Parent:
- 1:a457798861a4
- Child:
- 3:7bdacc4cf273
--- a/main.cpp Fri Oct 17 21:50:24 2014 +0000 +++ b/main.cpp Fri Oct 17 22:44:17 2014 +0000 @@ -18,6 +18,8 @@ * - Added support of internal accelerometer. * - Code commented. * - Included Rx and Tx Buffer in order to allow MSGHDL integration. + * Rev 0.1.1 14/10/2014 + * - Corrected placing o data into Tx buffer */ /** @@ -133,8 +135,10 @@ if( u8IMUStatus == 0 ) { /* Place data in Tx Buffer */ - au8TxBuffer[1] = accData.x; - au8TxBuffer[3] = accData.y; + au8TxBuffer[1] = (uint8_t)((accData.x)&0x00FF); + au8TxBuffer[2] = (uint8_t)(((accData.x)&0xFF00)>>8); + au8TxBuffer[3] = (uint8_t)((accData.y)&0x00FF); + au8TxBuffer[4] = (uint8_t)(((accData.y)&0xFF00)>>8); xComPort1.printf("ACCEL: %i,%i \r\n",accData.x,accData.y); } else