mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 05:20:35 +08:00
FlightTask: set min_distance_to_ground to NAN as default and when
distance sensor is used to SENS_FLOW_MINRNG
This commit is contained in:
committed by
Lorenz Meier
parent
80775d588b
commit
bd85f5f993
@@ -117,4 +117,5 @@ void FlightTask::_setDefaultConstraints()
|
||||
_constraints.speed_down = MPC_Z_VEL_MAX_DN.get();
|
||||
_constraints.tilt = math::radians(MPC_TILTMAX_AIR.get());
|
||||
_constraints.landing_gear = vehicle_constraints_s::GEAR_KEEP;
|
||||
_constraints.min_distance_to_ground = NAN;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ bool FlightTaskManualAltitude::activate()
|
||||
_position_setpoint(2) = _position(2);
|
||||
_velocity_setpoint(2) = 0.0f;
|
||||
_setDefaultConstraints();
|
||||
_constraints.min_distance_to_ground = SENS_FLOW_MINRNG.get();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user