From 945e5a386a1e097d063aa0159c012d787056e21d Mon Sep 17 00:00:00 2001 From: "ucart@co3050-12" <dawehr@iastate.edu> Date: Sun, 29 Jan 2017 20:46:44 -0600 Subject: [PATCH] changed getcontrol to respond with the same message ID that was received from groundstation in the original getcontrol command --- quad/sw/modular_quad_pid/src/callbacks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quad/sw/modular_quad_pid/src/callbacks.c b/quad/sw/modular_quad_pid/src/callbacks.c index 1d4604781..ca8293501 100644 --- a/quad/sw/modular_quad_pid/src/callbacks.c +++ b/quad/sw/modular_quad_pid/src/callbacks.c @@ -159,6 +159,7 @@ int cb_getcontrol(modular_structs_t* structs) { // Get the data length u16 data_len = uart_buff_get_u16(6); + u16 msg_id = uart_buff_get_u16(3); // Check if the data length is correct if (data_len == 2) { @@ -190,7 +191,7 @@ int cb_getcontrol(modular_structs_t* structs) } // Send the controller value - send_data(RESPCONTROL_ID, 0, (char *) &controller_value, sizeof(controller_value)); + send_data(RESPCONTROL_ID, msg_id, (char *) &controller_value, sizeof(controller_value)); } } -- GitLab