Rover: added acro mode to MIS_DONE_BEHAVE

This commit is contained in:
Ebin 2019-01-01 19:08:39 +05:30 committed by Randy Mackay
parent 85c3286c6e
commit 0f5041e873
3 changed files with 8 additions and 2 deletions

View File

@ -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),

View File

@ -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);
}

View File

@ -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