mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 23:53:33 +08:00
fw pos ctrl: handle takeoff detection when switching to takeoff mode while in air
- simplify takeoff reset method - removes _last_manual variable in favor of _skipping_takeoff_detection, which is handled in the control mode setter - takeoff detection (both launch and runway) is skipped if entering takeoff mode from any other mode while having already been in the air - added method to runway takeoff class for force setting the fly state when we want to skip the takeoff detection
This commit is contained in:
committed by
Daniel Agar
parent
8cc6d02af3
commit
ddeca2538c
@@ -272,8 +272,7 @@ private:
|
||||
|
||||
RunwayTakeoff _runway_takeoff;
|
||||
|
||||
// true if the last iteration was in manual mode (used to determine when a reset is needed)
|
||||
bool _last_manual{false};
|
||||
bool _skipping_takeoff_detection{false};
|
||||
|
||||
/* throttle and airspeed states */
|
||||
|
||||
@@ -578,7 +577,7 @@ private:
|
||||
float get_auto_airspeed_setpoint(const float control_interval, const float pos_sp_cru_airspeed,
|
||||
const Vector2f &ground_speed);
|
||||
|
||||
void reset_takeoff_state(bool force = false);
|
||||
void reset_takeoff_state();
|
||||
void reset_landing_state();
|
||||
|
||||
bool using_npfg_with_wind_estimate() const;
|
||||
|
||||
Reference in New Issue
Block a user