Plane: added Q_ENABLE=2 for starting AUTO in VTOL
This commit is contained in:
parent
0aa1ae048d
commit
38a7bfd81f
@ -6,8 +6,8 @@ const AP_Param::GroupInfo QuadPlane::var_info[] = {
|
|||||||
|
|
||||||
// @Param: ENABLE
|
// @Param: ENABLE
|
||||||
// @DisplayName: Enable QuadPlane
|
// @DisplayName: Enable QuadPlane
|
||||||
// @Description: This enables QuadPlane functionality, assuming quad motors on outputs 5 to 8
|
// @Description: This enables QuadPlane functionality, assuming multicopter motors start on output 5. If this is set to 2 then when starting AUTO mode it will initially be in VTOL AUTO mode.
|
||||||
// @Values: 0:Disable,1:Enable
|
// @Values: 0:Disable,1:Enable,2:Enable VTOL AUTO
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO_FLAGS("ENABLE", 1, QuadPlane, enable, 0, AP_PARAM_FLAG_ENABLE),
|
AP_GROUPINFO_FLAGS("ENABLE", 1, QuadPlane, enable, 0, AP_PARAM_FLAG_ENABLE),
|
||||||
|
|
||||||
|
@ -426,7 +426,11 @@ void Plane::set_mode(enum FlightMode mode)
|
|||||||
|
|
||||||
case AUTO:
|
case AUTO:
|
||||||
auto_throttle_mode = true;
|
auto_throttle_mode = true;
|
||||||
auto_state.vtol_mode = false;
|
if (quadplane.available() && quadplane.enable == 2) {
|
||||||
|
auto_state.vtol_mode = true;
|
||||||
|
} else {
|
||||||
|
auto_state.vtol_mode = false;
|
||||||
|
}
|
||||||
next_WP_loc = prev_WP_loc = current_loc;
|
next_WP_loc = prev_WP_loc = current_loc;
|
||||||
// start or resume the mission, based on MIS_AUTORESET
|
// start or resume the mission, based on MIS_AUTORESET
|
||||||
mission.start_or_resume();
|
mission.start_or_resume();
|
||||||
|
Loading…
Reference in New Issue
Block a user