mirror of https://github.com/ArduPilot/ardupilot
Rover: added acro mode to MIS_DONE_BEHAVE
This commit is contained in:
parent
85c3286c6e
commit
0f5041e873
|
@ -684,7 +684,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
|
|||
// @Param: MIS_DONE_BEHAVE
|
||||
// @DisplayName: Mission done behave
|
||||
// @Description: Mode to become after mission done
|
||||
// @Values: 0:Hold,1:Loiter
|
||||
// @Values: 0:Hold,1:Loiter, 2:Acro
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("MIS_DONE_BEHAVE", 38, ParametersG2, mis_done_behave, 0),
|
||||
|
||||
|
|
|
@ -112,6 +112,11 @@ void ModeAuto::exit_mission()
|
|||
if (g2.mis_done_behave == MIS_DONE_BEHAVE_LOITER && rover.set_mode(rover.mode_loiter, MODE_REASON_MISSION_END)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g2.mis_done_behave == MIS_DONE_BEHAVE_ACRO && rover.set_mode(rover.mode_acro, MODE_REASON_MISSION_END)) {
|
||||
return;
|
||||
}
|
||||
|
||||
rover.set_mode(rover.mode_hold, MODE_REASON_MISSION_END);
|
||||
}
|
||||
|
||||
|
|
|
@ -319,7 +319,8 @@ private:
|
|||
|
||||
enum Mis_Done_Behave {
|
||||
MIS_DONE_BEHAVE_HOLD = 0,
|
||||
MIS_DONE_BEHAVE_LOITER = 1
|
||||
MIS_DONE_BEHAVE_LOITER = 1,
|
||||
MIS_DONE_BEHAVE_ACRO = 2
|
||||
};
|
||||
|
||||
// Loiter control
|
||||
|
|
Loading…
Reference in New Issue