Skip to content
Snippets Groups Projects
Commit 3329d69d authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Daniel Agar
Browse files

mc_pos_control: replace const with constexpr

parent 4627d5d6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment