forked from Archive/PX4-Autopilot
mc_pos_control: replace const with constexpr
This commit is contained in:
parent
4627d5d6e4
commit
3329d69d05
|
@ -683,11 +683,9 @@ MulticopterPositionControl::run()
|
|||
constraints.speed_up = _takeoff_speed;
|
||||
// altitude above reference takeoff
|
||||
const float alt_above_tko = -(_states.position(2) - _takeoff_reference_z);
|
||||
// altitude threshold at which full control is enabled
|
||||
const float alt_threshold = 0.5f; //at 0.5m above grouund, control all setpoints
|
||||
|
||||
// disable position-xy / yaw control when close to ground
|
||||
if (alt_above_tko <= alt_threshold) {
|
||||
if (alt_above_tko <= ALTITUDE_THRESHOLD) {
|
||||
// don't control position in xy
|
||||
setpoint.x = setpoint.y = NAN;
|
||||
setpoint.vx = setpoint.vy = NAN;
|
||||
|
|
Loading…
Reference in New Issue