diff --git a/Code Telecommande/src/udp_server.c b/Code Telecommande/src/udp_server.c index 5653781..c7ecad1 100644 --- a/Code Telecommande/src/udp_server.c +++ b/Code Telecommande/src/udp_server.c @@ -93,8 +93,10 @@ void udp_server_send(void) for(uint i = 0; i < 16; i++) data[i] = 0; + data[UDP_PAYLOAD_ANGLE_L_BYTE] = controller.inputs_buffer.robot_angle & 0xff; + data[UDP_PAYLOAD_ANGLE_H_BYTE] = (controller.inputs_buffer.robot_angle >> 8) & 0xff; data[UDP_PAYLOAD_X_AXIS_SPEED_BYTE] = *(uint8_t *)&controller.inputs_buffer.x_axis_speed; - data[UDP_PAYLOAD_Y_AXIS_SPEED_BYTE] = *(uint8_t *)&controller.inputs_buffer.x_axis_speed; + data[UDP_PAYLOAD_Y_AXIS_SPEED_BYTE] = *(uint8_t *)&controller.inputs_buffer.y_axis_speed; udp_server_send_data(data, UDP_SERVER_BUFFER_SIZE); } \ No newline at end of file