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: KL25Z_ClockControl MODSERIAL mbed
Fork of EtherCAT-XbusMaster by
Diff: soes.cpp
- Revision:
- 41:e307b3dcab55
- Parent:
- 40:0528d79e63f2
- Child:
- 42:ef78d11f2bd7
diff -r 0528d79e63f2 -r e307b3dcab55 soes.cpp
--- a/soes.cpp Fri Sep 11 15:15:46 2015 +0000
+++ b/soes.cpp Fri Sep 11 15:27:57 2015 +0000
@@ -272,9 +272,10 @@
{
for(int sensor = 0; sensor < 3 ; sensor++)
{
- const int num_bytes = 50;//4 floats * 4 bytes
+ const int num_bytes_quat = 4*4;//sizeof(float);//4 floats * 4 bytes
+ const int num_bytes_msg = num_bytes_quat + 2; //timestamp
//memcpy_byteswap((uint8_t *)&local_Rb.first.timestamp ,&xbus_master.rx.buffer[4], 2);
- //memcpy_floatswap((uint8_t *)&local_Rb.xsens_imu[sensor].q0,&xbus_master.rx.buffer[6+(sensor*num_bytes)], num_bytes);
+ memcpy_floatswap((uint8_t *)&local_Rb.xsens_imu[sensor].q0,&xbus_master.rx.buffer[6+(sensor*num_bytes_msg)], num_bytes_quat);
//memcpy_byteswap((uint8_t *)&local_Rb.xsens_imu[sensor].samplecounter,&xbus_master.rx.buffer[6+num_bytes+(sensor*num_bytes)],2);
//pc.printf("%x %x\n",Rb.timestamp, *((uint16_t *)(&xbus_master.rx.buffer[4])));
//PLOEP;
