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.
Diff: leg_message.h
- Revision:
- 15:d3c93f01a02b
- Parent:
- 12:b203f3ae57d0
--- a/leg_message.h	Mon Aug 30 15:47:18 2021 +0000
+++ b/leg_message.h	Mon Jan 31 20:43:05 2022 +0000
@@ -3,28 +3,44 @@
 
 #include <stdint.h>
 
-// 36 bytes
-// 18 16-bit words
+// 31*4 bytes = 124 8-bit words
+// 31 32-bit numbers
 struct spi_data_t
 {
-    float q_1s[2];
-    float qd_1s[2];
-    float tau_1s[2];
-    int32_t flags[2];
-    int32_t checksum;
+    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];
+    uint32_t flags[3];
+    uint32_t checksum;
 };
 
-// 52 bytes
-// 26 16-bit words
+// 49*4 bytes = 196 8-bit words
+// 49 32-bit numbers
 struct spi_command_t
 {
-    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;
+    float q_des_1s[3]; //first motor on each can bus 0-can1, 1-can2, 2-can3
+    float q_des_2s[3];
+    float q_des_3s[3];
+    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];
+    uint32_t flags[3];
+    uint32_t checksum;
 };