test code for SPI communications with any board

Dependencies:   mbed-dev

Revision:
11:f3f01f363dd1
Parent:
10:42438194e82b
Child:
12:b203f3ae57d0
--- a/leg_message.h	Tue Apr 13 19:11:12 2021 +0000
+++ b/leg_message.h	Tue May 11 20:17:48 2021 +0000
@@ -7,38 +7,22 @@
 // 62 16-bit words
 struct spi_data_t
 {
-    float q_1s[3];
-    float q_2s[3];
-    float q_3s[3];
-    float qd_1s[3];
-    float qd_2s[3];
-    float qd_3s[3];
-    float tau_1s[3];
-    float tau_2s[3];
-    float tau_3s[3];
-    int32_t flags[3];
+    float q_1s[2];
+    float qd_1s[2];
+    float tau_1s[2];
+    int32_t flags[2];
     int32_t checksum;
 };
 
 // 196 bytes
 struct spi_command_t
 {
-    float q_des_1s[3]; //first motor on each can bus 0-can1, 1-can2, 2-can3
-    float q_des_2s[3]; //second motor on each can bus
-    float q_des_3s[3]; //third motor on each can bus etc...
-    float qd_des_1s[3];
-    float qd_des_2s[3];
-    float qd_des_3s[3];
-    float kp_1s[3];
-    float kp_2s[3];
-    float kp_3s[3];
-    float kd_1s[3];
-    float kd_2s[3];
-    float kd_3s[3];
-    float tau_1s_ff[3];
-    float tau_2s_ff[3];
-    float tau_3s_ff[3];
-    int32_t flags[3];
+    float q_des_1s[2]; //first motor on each can bus 0-can1, 1-can2, 2-can3
+    float qd_des_1s[2];
+    float kp_1s[2];
+    float kd_1s[2];
+    float tau_1s_ff[2];
+    int32_t flags[2];
     int32_t checksum;
 };