From 99c75a960e14d4a0cb64d587d0c4a3e431bfa9dd Mon Sep 17 00:00:00 2001 From: CallanDaniel Date: Wed, 10 Jul 2024 12:22:21 +0200 Subject: [PATCH] ArduPlane: make VTOL approach and landing functions public Made the functions that check if we are in VTOL approach or landing phase public to expose to Lua scripting --- ArduPlane/quadplane.h | 51 ++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/ArduPlane/quadplane.h b/ArduPlane/quadplane.h index 2ced92498b423f..d45869d99ad296 100644 --- a/ArduPlane/quadplane.h +++ b/ArduPlane/quadplane.h @@ -636,31 +636,6 @@ class QuadPlane QAutoTune qautotune; #endif - /* - are we in the approach phase of a VTOL landing? - */ - bool in_vtol_land_approach(void) const; - - /* - are we in the final landing phase of a VTOL landing? - */ - bool in_vtol_land_final(void) const; - - /* - are we in any of the phases of a VTOL landing? - */ - bool in_vtol_land_sequence(void) const; - - /* - see if we are in the VTOL position control phase of a landing - */ - bool in_vtol_land_poscontrol(void) const; - - /* - are we in the airbrake phase of a VTOL landing? - */ - bool in_vtol_airbrake(void) const; - // returns true if the vehicle should currently be doing a spiral landing bool landing_with_fixed_wing_spiral_approach(void) const; @@ -720,6 +695,32 @@ class QuadPlane MAV_RESULT mavlink_motor_test_start(mavlink_channel_t chan, uint8_t motor_seq, uint8_t throttle_type, uint16_t throttle_value, float timeout_sec, uint8_t motor_count); + + /* + are we in the approach phase of a VTOL landing? + */ + bool in_vtol_land_approach(void) const; + + /* + are we in the final landing phase of a VTOL landing? + */ + bool in_vtol_land_final(void) const; + + /* + are we in any of the phases of a VTOL landing? + */ + bool in_vtol_land_sequence(void) const; + + /* + see if we are in the VTOL position control phase of a landing + */ + bool in_vtol_land_poscontrol(void) const; + + /* + are we in the airbrake phase of a VTOL landing? + */ + bool in_vtol_airbrake(void) const; + private: void motor_test_stop();