Unverified Commit 556599a3 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6322 from CopterExpress/px4_precland

Add PX4 Precision Land flight mode
parents 910ee096 719fdb82
......@@ -48,6 +48,7 @@ PX4FirmwarePlugin::PX4FirmwarePlugin(void)
, _missionFlightMode(tr("Mission"))
, _rtlFlightMode(tr("Return"))
, _landingFlightMode(tr("Land"))
, _preclandFlightMode(tr("Precision Land"))
, _rtgsFlightMode(tr("Return to Groundstation"))
, _followMeFlightMode(tr("Follow Me"))
, _simpleFlightMode(tr("Simple"))
......@@ -84,6 +85,7 @@ PX4FirmwarePlugin::PX4FirmwarePlugin(void)
{ PX4_CUSTOM_MAIN_MODE_OFFBOARD, 0, true, false, true },
// modes that can't be directly set by the user
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_LAND, false, true, true },
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_PRECLAND, false, false, true },
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_READY, false, true, true },
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_RTGS, false, true, true },
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_TAKEOFF, false, true, true },
......@@ -104,6 +106,7 @@ PX4FirmwarePlugin::PX4FirmwarePlugin(void)
&_followMeFlightMode,
&_offboardFlightMode,
&_landingFlightMode,
&_preclandFlightMode,
&_readyFlightMode,
&_rtgsFlightMode,
&_takeoffFlightMode,
......
......@@ -101,6 +101,7 @@ protected:
QString _missionFlightMode;
QString _rtlFlightMode;
QString _landingFlightMode;
QString _preclandFlightMode;
QString _rtgsFlightMode;
QString _followMeFlightMode;
QString _simpleFlightMode;
......
......@@ -34,7 +34,7 @@
/**
* @file px4_custom_mode.h
* PX4 custom flight modes
* Copied from PX4 2017-07-08 - https://github.com/PX4/Firmware/blob/master/src/modules/commander/px4_custom_mode.h#L45
* Copied from PX4 2018-04-07 - https://github.com/PX4/Firmware/blob/master/src/modules/commander/px4_custom_mode.h#L45
*/
#ifndef PX4_CUSTOM_MODE_H_
......@@ -62,7 +62,8 @@ enum PX4_CUSTOM_SUB_MODE_AUTO {
PX4_CUSTOM_SUB_MODE_AUTO_RTL,
PX4_CUSTOM_SUB_MODE_AUTO_LAND,
PX4_CUSTOM_SUB_MODE_AUTO_RTGS,
PX4_CUSTOM_SUB_MODE_AUTO_FOLLOW_TARGET
PX4_CUSTOM_SUB_MODE_AUTO_FOLLOW_TARGET,
PX4_CUSTOM_SUB_MODE_AUTO_PRECLAND
};
union px4_custom_mode {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment