mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Rover: Add manual mode to MIS_DONE_BEHAVIOR
This commit is contained in:
parent
0535c4f592
commit
db1c653cc6
@ -589,7 +589,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
|
|||||||
// @Param: MIS_DONE_BEHAVE
|
// @Param: MIS_DONE_BEHAVE
|
||||||
// @DisplayName: Mission done behave
|
// @DisplayName: Mission done behave
|
||||||
// @Description: Behaviour after mission completes
|
// @Description: Behaviour after mission completes
|
||||||
// @Values: 0:Hold,1:Loiter,2:Acro
|
// @Values: 0:Hold,1:Loiter,2:Acro,3:Manual
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO("MIS_DONE_BEHAVE", 38, ParametersG2, mis_done_behave, 0),
|
AP_GROUPINFO("MIS_DONE_BEHAVE", 38, ParametersG2, mis_done_behave, 0),
|
||||||
|
|
||||||
|
@ -327,7 +327,8 @@ private:
|
|||||||
enum Mis_Done_Behave {
|
enum Mis_Done_Behave {
|
||||||
MIS_DONE_BEHAVE_HOLD = 0,
|
MIS_DONE_BEHAVE_HOLD = 0,
|
||||||
MIS_DONE_BEHAVE_LOITER = 1,
|
MIS_DONE_BEHAVE_LOITER = 1,
|
||||||
MIS_DONE_BEHAVE_ACRO = 2
|
MIS_DONE_BEHAVE_ACRO = 2,
|
||||||
|
MIS_DONE_BEHAVE_MANUAL = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
bool auto_triggered; // true when auto has been triggered to start
|
bool auto_triggered; // true when auto has been triggered to start
|
||||||
|
@ -449,6 +449,10 @@ void ModeAuto::exit_mission()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g2.mis_done_behave == MIS_DONE_BEHAVE_MANUAL && rover.set_mode(rover.mode_manual, ModeReason::MISSION_END)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
start_stop();
|
start_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user