EtherCAT slave that reads 3 Xsens IMU's connected to a Xbus Master

Dependencies:   MODSERIAL mbed KL25Z_ClockControl

Fork of EtherCAT by First Last

Revision:
32:1f6a705cd794
Parent:
28:8505285f65ed
Child:
33:b4844666684f
--- a/soes.cpp	Tue Mar 10 11:30:44 2015 +0000
+++ b/soes.cpp	Tue Mar 10 11:45:32 2015 +0000
@@ -242,7 +242,7 @@
         		if(xbus_master.rx.buffer[2] == 0x32)
         		{
         			memcpy_byteswap((uint8_t *)&local_Rb.timestamp   ,&xbus_master.rx.buffer[4], 2);
-        			memcpy_byteswap((uint8_t *)&local_Rb.first.acc[0],&xbus_master.rx.buffer[6],60);
+        			memcpy_byteswap((uint8_t *)&local_Rb.first.acc[0],&xbus_master.rx.buffer[6],xbus_master.rx.buffer[3] - 2);
         			//pc.printf("%x %x\n",Rb.timestamp, *((uint16_t *)(&xbus_master.rx.buffer[4])));
         			PLOEP;
         		}