From 68a1100c64af5444ae52947f81ce6c69e88bcb2c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 29 May 2021 09:54:15 +1000 Subject: [PATCH] Plane: use new APIs for takeoff/touchdown expected --- ArduPlane/quadplane.cpp | 8 ++++---- ArduPlane/servos.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 0d07f34fae..c19c7840fa 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -1536,7 +1536,7 @@ void QuadPlane::control_loiter() float descent_rate_cms = landing_descent_rate_cms(height_above_ground); if (poscontrol.state == QPOS_LAND_FINAL && (options & OPTION_DISABLE_GROUND_EFFECT_COMP) == 0) { - ahrs.setTouchdownExpected(true); + ahrs.set_touchdown_expected(true); } set_climb_rate_cms(-descent_rate_cms, descent_rate_cms>0); @@ -2774,7 +2774,7 @@ void QuadPlane::vtol_position_controller(void) float height_above_ground = plane.relative_ground_altitude(plane.g.rangefinder_landing); if (poscontrol.state == QPOS_LAND_FINAL) { if ((options & OPTION_DISABLE_GROUND_EFFECT_COMP) == 0) { - ahrs.setTouchdownExpected(true); + ahrs.set_touchdown_expected(true); } } const float descent_rate_cms = landing_descent_rate_cms(height_above_ground); @@ -3066,7 +3066,7 @@ bool QuadPlane::verify_vtol_takeoff(const AP_Mission::Mission_Command &cmd) if (now - takeoff_start_time_ms < 3000 && (options & OPTION_DISABLE_GROUND_EFFECT_COMP) == 0) { - ahrs.setTakeoffExpected(true); + ahrs.set_takeoff_expected(true); } // check for failure conditions @@ -3536,7 +3536,7 @@ bool QuadPlane::do_user_takeoff(float takeoff_altitude) guided_start(); guided_takeoff = true; if ((options & OPTION_DISABLE_GROUND_EFFECT_COMP) == 0) { - ahrs.setTakeoffExpected(true); + ahrs.set_takeoff_expected(true); } return true; } diff --git a/ArduPlane/servos.cpp b/ArduPlane/servos.cpp index fc4f923383..c275fc6ac9 100644 --- a/ArduPlane/servos.cpp +++ b/ArduPlane/servos.cpp @@ -570,7 +570,7 @@ void Plane::set_servos_controlled(void) bool throw_detected = accel_x_due_to_throw > GRAVITY_MSS; bool throttle_up_detected = throttle > aparm.throttle_cruise; if (throw_detected || throttle_up_detected) { - plane.ahrs.setTakeoffExpected(true); + plane.ahrs.set_takeoff_expected(true); } } }