Updated for checksum
Diff: leg_message.h
- Revision:
- 13:87e7ce883f6a
- Parent:
- 10:42438194e82b
- Child:
- 15:56a06363a698
--- a/leg_message.h Thu Feb 03 19:10:54 2022 +0000 +++ b/leg_message.h Fri Feb 04 19:42:10 2022 +0000 @@ -3,8 +3,8 @@ #include <stdint.h> -// 124 bytes -// 62 16-bit words +// 31*4 bytes = 124 8-bit words +// 31 32-bit numbers struct spi_data_t { float q_1s[3]; @@ -16,16 +16,17 @@ float tau_1s[3]; float tau_2s[3]; float tau_3s[3]; - int32_t flags[3]; - int32_t checksum; + uint32_t flags[3]; + uint32_t checksum; }; -// 196 bytes +// 49*4 bytes = 196 8-bit words +// 49 32-bit numbers 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 q_des_2s[3]; + float q_des_3s[3]; float qd_des_1s[3]; float qd_des_2s[3]; float qd_des_3s[3]; @@ -38,8 +39,8 @@ float tau_1s_ff[3]; float tau_2s_ff[3]; float tau_3s_ff[3]; - int32_t flags[3]; - int32_t checksum; + uint32_t flags[3]; + uint32_t checksum; }; @@ -53,7 +54,7 @@ }; struct grouped_act_state{ - joint_state a1, a2, a3; + joint_state a1, a2, a3; //removed a2 and a3 }; struct grouped_act_control{ joint_control a1, a2, a3;