mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 21:43:33 +08:00
fw pos ctrl: mark completed manual takeoff true if rotary wing and armed
This commit is contained in:
committed by
Daniel Agar
parent
b4e066f056
commit
69bc5d37bc
@@ -725,8 +725,9 @@ FixedwingPositionControl::updateManualTakeoffStatus()
|
|||||||
if (!_completed_manual_takeoff) {
|
if (!_completed_manual_takeoff) {
|
||||||
const bool at_controllable_airspeed = _airspeed > _param_fw_airspd_min.get()
|
const bool at_controllable_airspeed = _airspeed > _param_fw_airspd_min.get()
|
||||||
|| !_airspeed_valid;
|
|| !_airspeed_valid;
|
||||||
_completed_manual_takeoff = !_landed
|
const bool is_hovering = _vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING
|
||||||
&& at_controllable_airspeed;
|
&& _control_mode.flag_armed;
|
||||||
|
_completed_manual_takeoff = (!_landed && at_controllable_airspeed) || is_hovering;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user