diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-24 11:42:23 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-24 11:42:23 +0200 |
commit | 40f6164ba6187a0160af9fe200bbd1d729e8c03b (patch) | |
tree | 84246633f40cb0c5d858168f63a5933d18006db3 /shared/protocol.c | |
parent | 2e537232404bf5123bc92e7218156ec03160c68f (diff) |
added TARQ to robot and client
Diffstat (limited to 'shared/protocol.c')
-rw-r--r-- | shared/protocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shared/protocol.c b/shared/protocol.c index 02d746a..8aa4a3f 100644 --- a/shared/protocol.c +++ b/shared/protocol.c @@ -23,6 +23,7 @@ void w2_cmd_setup_handlers() { g_w2_cmd_handlers[W2_CMD_DISP | W2_CMDDIR_RX] = w2_cmd_disp_rx; g_w2_cmd_handlers[W2_CMD_PLAY | W2_CMDDIR_RX] = w2_cmd_play_rx; g_w2_cmd_handlers[W2_CMD_CLED | W2_CMDDIR_RX] = w2_cmd_cled_rx; + g_w2_cmd_handlers[W2_CMD_TARQ | W2_CMDDIR_RX] = w2_cmd_tarq_rx; } size_t w2_cmd_sizeof(uint8_t data[W2_SERIAL_READ_BUFFER_SIZE], uint8_t data_length) { @@ -47,6 +48,8 @@ size_t w2_cmd_sizeof(uint8_t data[W2_SERIAL_READ_BUFFER_SIZE], uint8_t data_leng if (data[0] == (W2_CMD_INFO | W2_CMDDIR_RX)) return sizeof(w2_s_cmd_info_rx); if (data[0] == (W2_CMD_INFO | W2_CMDDIR_TX)) return sizeof(w2_s_cmd_info_tx); + if (data[0] == (W2_CMD_TARQ | W2_CMDDIR_RX)) return sizeof(w2_s_cmd_tarq_rx); + w2_s_bin *copy = w2_bin_s_alloc(data_length, data); uint8_t length = 1; |