diff --git a/Robotito/src/control/control.c b/Robotito/src/control/control.c index 5aba34fb5b090c6d0bd4b9f4b9e7e2c57a1d40b0..60f5beb5b05e18a623d5f6137fe3931b4f3edf00 100644 --- a/Robotito/src/control/control.c +++ b/Robotito/src/control/control.c @@ -105,14 +105,14 @@ static void callback_odometry(){ o->y_dot = v->y; o->phi += v->z * OMNI_ODOM_CTRL_TIMER; o->phi_dot = v->z; - - - float_buffer[0] = o->x; - float_buffer[1] = o->x_dot; - float_buffer[2] = o->y; - float_buffer[3] = o->y_dot; - float_buffer[4] = o->phi; - float_buffer[5] = o->phi_dot; + + + float_buffer[0] = tics_motores[0]/OMNI_ODOM_CTRL_TIMER; + float_buffer[1] = motors[0].target_v; + float_buffer[2] = tics_motores[1]/OMNI_ODOM_CTRL_TIMER; + float_buffer[3] = motors[1].target_v; + float_buffer[4] = tics_motores[2]/OMNI_ODOM_CTRL_TIMER; + float_buffer[5] = motors[2].target_v; uart_write_bytes(UART_NUM_2, float_buffer, sizeof(float)*6 ); free(v); }