mirror of https://github.com/ArduPilot/ardupilot
use Qplane option to allow autoland and fix auto-flaps
This commit is contained in:
parent
00fa1c4f35
commit
c08af5ba19
|
@ -689,8 +689,6 @@ void Plane::update_flight_stage(void)
|
|||
// This prevents TECS from being stuck in the wrong stage if you switch from
|
||||
// AUTO to, say, FBWB during a landing, an aborted landing or takeoff.
|
||||
set_flight_stage(AP_FixedWing::FlightStage::NORMAL);
|
||||
} else if (control_mode == &mode_autoland) {
|
||||
set_flight_stage(AP_FixedWing::FlightStage::LAND);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ bool ModeAutoLand::_enter()
|
|||
|
||||
//takeoff direction must be set and must not be a quadplane, otherwise since flying switch to RTL so this can be used as FS action
|
||||
#if HAL_QUADPLANE_ENABLED
|
||||
if (quadplane.available()) {
|
||||
gcs().send_text(MAV_SEVERITY_WARNING, "AutoLand is fixed wing only mode");
|
||||
if (quadplane.available() && !quadplane.option_is_set(QuadPlane::OPTION::ALLOW_FW_LAND)) {
|
||||
gcs().send_text(MAV_SEVERITY_WARNING, "Option not set to allow fixed wing autoland");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -105,6 +105,7 @@ void ModeAutoLand::navigate()
|
|||
plane.prev_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc = home_loc;
|
||||
plane.start_command(cmd);
|
||||
plane.set_flight_stage(AP_FixedWing::FlightStage::LAND);
|
||||
}
|
||||
return;
|
||||
//otherwise keep flying the current command
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
friend class ModeQAutotune;
|
||||
friend class ModeQAcro;
|
||||
friend class ModeLoiterAltQLand;
|
||||
friend class ModeAutoLand;
|
||||
|
||||
QuadPlane(AP_AHRS &_ahrs);
|
||||
|
||||
|
|
Loading…
Reference in New Issue