Delta Robot example

Dependencies:   BufferedSerial Eigen

Fork of TCPSocket_Example by mbed_example

Revision:
5:01e1e68309ae
Parent:
4:778bc352c47f
--- a/comms.h	Sun Oct 07 19:40:12 2018 +0000
+++ b/comms.h	Mon Oct 15 18:30:20 2018 +0000
@@ -1,32 +1,39 @@
 #ifndef COMMS_H
 #define COMMS_H
 
-
+#include <stdint.h>
 struct OdriveCMD{
     float position;
     float velocity;
     float torque;
     float maxCurrent;
-    int mode;
+    int32_t mode;
 };
 struct ServoCMD{
     float angle;
     float atTime;
 };
 
+struct rosTime{
+    int32_t seconds;
+    int32_t nSeconds;
+};
+
 struct toRobot{
     OdriveCMD motor1;
     OdriveCMD motor2;
     OdriveCMD motor3;
     ServoCMD servo1;
     ServoCMD servo2;
-    long time;
-    int count;
+    rosTime time;
+    float timeOffset;
+    int32_t isPing;
+    int32_t count;
 };
 
 struct OdriveINFO{
     float speed;
-    int position;
+    int32_t position;
     float busVoltage;
     float setCurrent;
     float measuredCurrent;
@@ -53,8 +60,10 @@
     OdriveINFO motor3;
     imuINFO imu;
     gunINFO gun;
-    long time;
-    int count;
+    rosTime time;
+    rosTime pingTime;
+    int32_t isPing;
+    int32_t count;
 };