diff options
Diffstat (limited to 'client/serial.c')
-rw-r--r-- | client/serial.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/serial.c b/client/serial.c index 112fd81..2a4d26f 100644 --- a/client/serial.c +++ b/client/serial.c @@ -3,6 +3,7 @@ #include "../shared/protocol.h" #include "../shared/serial_parse.h" #include "commands.h" +#include "errcatch.h" #include "main.h" #include "serial.h" #include "time.h" @@ -26,14 +27,17 @@ void w2_cmd_ping_rx(w2_s_bin *data) { void w2_cmd_ping_tx(w2_s_bin *data) { w2_send_bin(data); } -void w2_cmd_expt_tx(w2_s_bin *data) {} +void w2_cmd_expt_tx(w2_s_bin *data) { + W2_CAST_BIN(w2_s_cmd_expt_tx, data, cast); + w2_errcatch_throw_msg(cast->error, cast->length, (char *)cast->message); +} + void w2_cmd_mode_tx(w2_s_bin *data) { W2_CAST_BIN(w2_s_cmd_mode_tx, data, cast); g_w2_state.mode = cast->mode; } void w2_cmd_cord_tx(w2_s_bin *data) {} void w2_cmd_bomd_tx(w2_s_bin *data) {} -void w2_cmd_sens_tx(w2_s_bin *data) {} void w2_cmd_info_tx(w2_s_bin *data) { memcpy(&g_w2_state.info, data->data, sizeof(w2_s_cmd_info_tx)); @@ -46,7 +50,6 @@ void w2_cmd_cord_rx(w2_s_bin *data) { return; } void w2_cmd_bomd_rx(w2_s_bin *data) { return; } void w2_cmd_sres_rx(w2_s_bin *data) { return; } void w2_cmd_mcfg_rx(w2_s_bin *data) { return; } -void w2_cmd_sens_rx(w2_s_bin *data) { return; } void w2_cmd_info_rx(w2_s_bin *data) { return; } void w2_cmd_disp_rx(w2_s_bin *data) { return; } void w2_cmd_play_rx(w2_s_bin *data) { return; } |