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:
12:cac4e7c2bd0f
Parent:
11:166353137b95
Child:
14:e3c49b75fee9
--- a/soes.cpp	Mon Mar 02 15:25:21 2015 +0000
+++ b/soes.cpp	Tue Mar 03 10:58:20 2015 +0000
@@ -39,13 +39,12 @@
 #include "cpuinit.h"
 #include "utypes.h"
 #include "esc.h"
+#include "MODSERIAL.h"
 
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
 #define wd_reset 1000
 
-#define BALANCE_WIDTH 0.435
-#define BALANCE_HEIGHT 0.24
 /* Private macro -------------------------------------------------------------*/
 /* Private variables ---------------------------------------------------------*/
 _ESCvar         ESCvar;
@@ -59,28 +58,12 @@
 _Ebuffer        Eb; //EEprom
 uint8           TXPDOsize,RXPDOsize;
 uint16          wd_ok = 1, wd_cnt = wd_reset;
-volatile uint8	correct_offset;
-float FrontRight_offset;
-float FrontLeft_offset;
-float BackLeft_offset;
-float BackRight_offset;
-float rawFrontLeft;
-float rawFrontRight;
-float rawBackLeft;
-float rawBackRight;
-float grf;
-//volatile uint8	diginput;
 
-//Serial shoe_serial(SHOE_SERIAL_TX,SHOE_SERIAL_RX);
 DigitalOut led(LED_PIN);
 DigitalOut et1100_ss(ET1100_SS);
 DigitalIn  et1100_miso(ET1100_MISO);
 SPI et1100_spi(ET1100_MOSI,ET1100_MISO,ET1100_SCK);
-AnalogIn adcFrontLeft(ADC_FL);
-AnalogIn adcFrontRight(ADC_FR);
-AnalogIn adcBackLeft(ADC_BL);
-AnalogIn adcBackRight(ADC_BR);
-
+MODSERIAL xbus(PTA1,PTA2);
 /* Private function prototypes -----------------------------------------------*/
 /* Private functions ---------------------------------------------------------*/