forked from Archive/PX4-Autopilot
Merge branch 'yaw_auto_failsafe' of github.com:PX4/Firmware
This commit is contained in:
commit
2116966b1e
|
@ -471,7 +471,10 @@ static int multirotor_pos_control_thread_main(int argc, char *argv[])
|
|||
} else {
|
||||
local_pos_sp.z = local_pos.ref_alt - global_pos_sp.altitude;
|
||||
}
|
||||
/* update yaw setpoint only if value is valid */
|
||||
if (isfinite(global_pos_sp.yaw) && fabsf(global_pos_sp.yaw) < M_TWOPI) {
|
||||
att_sp.yaw_body = global_pos_sp.yaw;
|
||||
}
|
||||
|
||||
mavlink_log_info(mavlink_fd, "[mpc] new sp: %.7f, %.7f (%.2f, %.2f)", (double)sp_lat, sp_lon, (double)local_pos_sp.x, (double)local_pos_sp.y);
|
||||
|
||||
|
|
Loading…
Reference in New Issue