Unverified Commit a1325460 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7987 from DonLakeFlyer/PlaneFlightMode

ArduPlane: Add missing flight modes
parents 34413b99 0ee4760a
...@@ -16,50 +16,58 @@ APMPlaneMode::APMPlaneMode(uint32_t mode, bool settable) ...@@ -16,50 +16,58 @@ APMPlaneMode::APMPlaneMode(uint32_t mode, bool settable)
: APMCustomMode(mode, settable) : APMCustomMode(mode, settable)
{ {
setEnumToStringMapping({ setEnumToStringMapping({
{MANUAL, "Manual"}, { MANUAL, "Manual" },
{CIRCLE, "Circle"}, { CIRCLE, "Circle" },
{STABILIZE, "Stabilize"}, { STABILIZE, "Stabilize" },
{TRAINING, "Training"}, { TRAINING, "Training" },
{ACRO, "Acro"}, { ACRO, "Acro" },
{FLY_BY_WIRE_A, "FBW A"}, { FLY_BY_WIRE_A, "FBW A" },
{FLY_BY_WIRE_B, "FBW B"}, { FLY_BY_WIRE_B, "FBW B" },
{CRUISE, "Cruise"}, { CRUISE, "Cruise" },
{AUTOTUNE, "Autotune"}, { AUTOTUNE, "Autotune" },
{AUTO, "Auto"}, { AUTO, "Auto" },
{RTL, "RTL"}, { RTL, "RTL" },
{LOITER, "Loiter"}, { LOITER, "Loiter" },
{GUIDED, "Guided"}, { TAKEOFF, "Takeoff" },
{INITIALIZING, "Initializing"}, { AVOID_ADSB, "Avoid ADSB" },
{QSTABILIZE, "QuadPlane Stabilize"}, { GUIDED, "Guided" },
{QHOVER, "QuadPlane Hover"}, { INITIALIZING, "Initializing" },
{QLOITER, "QuadPlane Loiter"}, { QSTABILIZE, "QuadPlane Stabilize" },
{QLAND, "QuadPlane Land"}, { QHOVER, "QuadPlane Hover" },
{QRTL, "QuadPlane RTL"}, { QLOITER, "QuadPlane Loiter" },
{ QLAND, "QuadPlane Land" },
{ QRTL, "QuadPlane RTL" },
{ QAUTOTUNE, "QuadPlane AutoTune" },
{ QACRO, "QuadPlane Acro" },
}); });
} }
ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(void) ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(void)
{ {
setSupportedModes({ setSupportedModes({
APMPlaneMode(APMPlaneMode::MANUAL ,true), APMPlaneMode(APMPlaneMode::MANUAL, true),
APMPlaneMode(APMPlaneMode::CIRCLE ,true), APMPlaneMode(APMPlaneMode::CIRCLE, true),
APMPlaneMode(APMPlaneMode::STABILIZE ,true), APMPlaneMode(APMPlaneMode::STABILIZE, true),
APMPlaneMode(APMPlaneMode::TRAINING ,true), APMPlaneMode(APMPlaneMode::TRAINING, true),
APMPlaneMode(APMPlaneMode::ACRO ,true), APMPlaneMode(APMPlaneMode::ACRO, true),
APMPlaneMode(APMPlaneMode::FLY_BY_WIRE_A ,true), APMPlaneMode(APMPlaneMode::FLY_BY_WIRE_A, true),
APMPlaneMode(APMPlaneMode::FLY_BY_WIRE_B ,true), APMPlaneMode(APMPlaneMode::FLY_BY_WIRE_B, true),
APMPlaneMode(APMPlaneMode::CRUISE ,true), APMPlaneMode(APMPlaneMode::CRUISE, true),
APMPlaneMode(APMPlaneMode::AUTOTUNE ,true), APMPlaneMode(APMPlaneMode::AUTOTUNE, true),
APMPlaneMode(APMPlaneMode::AUTO ,true), APMPlaneMode(APMPlaneMode::AUTO, true),
APMPlaneMode(APMPlaneMode::RTL ,true), APMPlaneMode(APMPlaneMode::RTL, true),
APMPlaneMode(APMPlaneMode::LOITER ,true), APMPlaneMode(APMPlaneMode::LOITER, true),
APMPlaneMode(APMPlaneMode::GUIDED ,true), APMPlaneMode(APMPlaneMode::TAKEOFF, true),
APMPlaneMode(APMPlaneMode::INITIALIZING ,false), APMPlaneMode(APMPlaneMode::AVOID_ADSB, false),
APMPlaneMode(APMPlaneMode::QSTABILIZE ,true), APMPlaneMode(APMPlaneMode::GUIDED, true),
APMPlaneMode(APMPlaneMode::QHOVER ,true), APMPlaneMode(APMPlaneMode::INITIALIZING, false),
APMPlaneMode(APMPlaneMode::QLOITER ,true), APMPlaneMode(APMPlaneMode::QSTABILIZE, true),
APMPlaneMode(APMPlaneMode::QLAND ,true), APMPlaneMode(APMPlaneMode::QHOVER, true),
APMPlaneMode(APMPlaneMode::QRTL ,true), APMPlaneMode(APMPlaneMode::QLOITER, true),
APMPlaneMode(APMPlaneMode::QLAND, true),
APMPlaneMode(APMPlaneMode::QRTL, true),
APMPlaneMode(APMPlaneMode::QAUTOTUNE, true),
APMPlaneMode(APMPlaneMode::QACRO, true),
}); });
if (!_remapParamNameIntialized) { if (!_remapParamNameIntialized) {
......
...@@ -33,8 +33,8 @@ public: ...@@ -33,8 +33,8 @@ public:
AUTO = 10, AUTO = 10,
RTL = 11, RTL = 11,
LOITER = 12, LOITER = 12,
RESERVED_13 = 13, // RESERVED FOR FUTURE USE TAKEOFF = 13,
RESERVED_14 = 14, // RESERVED FOR FUTURE USE AVOID_ADSB = 14,
GUIDED = 15, GUIDED = 15,
INITIALIZING = 16, INITIALIZING = 16,
QSTABILIZE = 17, QSTABILIZE = 17,
...@@ -42,6 +42,8 @@ public: ...@@ -42,6 +42,8 @@ public:
QLOITER = 19, QLOITER = 19,
QLAND = 20, QLAND = 20,
QRTL = 21, QRTL = 21,
QAUTOTUNE = 22,
QACRO = 23,
}; };
APMPlaneMode(uint32_t mode, bool settable); APMPlaneMode(uint32_t mode, bool settable);
......
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