mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-03 22:48:28 -04:00
AP_Mission: added continue after land mission option
this allows for option to continue a mission after a landing is complete. The default in copter was to continue, so adding this option makes copter not continue by default. Plane already disarmed on land complete.
This commit is contained in:
parent
f9b02a6814
commit
7c49723f19
@ -27,7 +27,7 @@ const AP_Param::GroupInfo AP_Mission::var_info[] = {
|
||||
// @Param: OPTIONS
|
||||
// @DisplayName: Mission options bitmask
|
||||
// @Description: Bitmask of what options to use in missions.
|
||||
// @Bitmask: 0:Clear Mission on reboot, 1:Use distance to land calc on battery failsafe
|
||||
// @Bitmask: 0:Clear Mission on reboot, 1:Use distance to land calc on battery failsafe,2:ContinueAfterLand
|
||||
// @User: Advanced
|
||||
AP_GROUPINFO("OPTIONS", 2, AP_Mission, _options, AP_MISSION_OPTIONS_DEFAULT),
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define AP_MISSION_OPTIONS_DEFAULT 0 // Do not clear the mission when rebooting
|
||||
#define AP_MISSION_MASK_MISSION_CLEAR (1<<0) // If set then Clear the mission on boot
|
||||
#define AP_MISSION_MASK_DIST_TO_LAND_CALC (1<<1) // Allow distance to best landing calculation to be run on failsafe
|
||||
#define AP_MISSION_MASK_CONTINUE_AFTER_LAND (1<<2) // Allow mission to continue after land
|
||||
|
||||
#define AP_MISSION_MAX_WP_HISTORY 7 // The maximum number of previous wp commands that will be stored from the active missions history
|
||||
#define LAST_WP_PASSED (AP_MISSION_MAX_WP_HISTORY-2)
|
||||
@ -547,6 +548,15 @@ public:
|
||||
// reset the mission history to prevent recalling previous mission histories when restarting missions.
|
||||
void reset_wp_history(void);
|
||||
|
||||
/*
|
||||
return true if MIS_OPTIONS is set to allow continue of mission
|
||||
logic after a land. If this is false then after a landing is
|
||||
complete the vehicle should disarm and mission logic should stop
|
||||
*/
|
||||
bool continue_after_land(void) const {
|
||||
return (_options.get() & AP_MISSION_MASK_CONTINUE_AFTER_LAND) != 0;
|
||||
}
|
||||
|
||||
// user settable parameters
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user