ACM: Arducopter.pde - Added a constraint to the NO_NAV mode to be similar to the Loiter and rate nav modes.

This commit is contained in:
Jason Short 2012-03-18 14:50:02 -07:00
parent a0717f082e
commit c5344a2a85

View File

@ -2210,6 +2210,9 @@ static void update_nav_wp()
nav_lon = g.pid_loiter_rate_lon.get_integrator();
nav_lat = g.pid_loiter_rate_lon.get_integrator();
nav_lon = constrain(nav_lon, -2000, 2000); // 20°
nav_lat = constrain(nav_lat, -2000, 2000); // 20°
// rotate pitch and roll to the copter frame of reference
calc_loiter_pitch_roll();
}