Skip to content

Commit

Permalink
ArduPlane: make VTOL approach and landing functions public
Browse files Browse the repository at this point in the history
Made the functions that check if we are in VTOL approach or landing phase public to expose to Lua scripting
  • Loading branch information
CallanDaniel committed Jul 12, 2024
1 parent 3bfc148 commit 752b4d3
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions ArduPlane/quadplane.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 752b4d3

Please sign in to comment.