I successfully set up and executed the c_uart_interface_example found at https://github.com/mavlink/c_uart_interface_example. However, when I try to print out the MAVLink message POSITION_TARGET_LOCAL_NED to verify the new position setpoint set by the SET_POSITION_TARGET_LOCAL_NED message, I get all 0s. In the example, the new position setpoint is [3.2935, -6.1447, -0.7609], as seen by the POSITION SETPOINT XYZ = [ 3.2935 , -6.1447 , -0.7609 ] printout under the example output section. However, when I try to add the three lines of code seen below to line 261 in the mavlink_control.cpp file, all I get is 0s as the new position target. Why isn’t it printing out the [ 3.2935 , -6.1447 , -0.7609 ] values?
mavlink_position_target_local_ned_t pos_target = messages.position_target_local_ned; printf("Got message POSITION_TARGET_LOCAL_NED \n"); printf(" pos & vel target (NED): %f %f %f \n", pos_target.x, pos_target.y, pos_target.z );