Skip to content

Commit

Permalink
add ArduPlane flight modes
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Hwurzburg committed Jan 13, 2025
1 parent e0fd8eb commit 8bea6b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(void)
, _qAutotuneFlightMode (tr("QuadPlane AutoTune"))
, _qAcroFlightMode (tr("QuadPlane Acro"))
, _thermalFlightMode (tr("Thermal"))
, _loiter2qlandFlightMod (tr("Loiter to QLand"))
, _autolandFlightMode (tr("Autoland"))
{
_setModeEnumToModeStringMapping({
{APMPlaneMode::MANUAL , _manualFlightMode },
Expand All @@ -64,6 +66,9 @@ ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(void)
{APMPlaneMode::QAUTOTUNE , _qAutotuneFlightMode },
{APMPlaneMode::QACRO , _qAcroFlightMode },
{APMPlaneMode::THERMAL , _thermalFlightMode },
{APMPlaneMode::LOITER2QLAND , _loiter2qlandFlightMode},
{APMPlaneMode::AUTOLAND , _autolandFlightMode },

});

updateAvailableFlightModes({
Expand Down Expand Up @@ -92,6 +97,8 @@ ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(void)
{ _qAutotuneFlightMode , APMPlaneMode::QAUTOTUNE , true , true },
{ _qAcroFlightMode , APMPlaneMode::QACRO , true , true },
{ _thermalFlightMode , APMPlaneMode::THERMAL , true , true },
{ _loiter2qlandFlightMode , APMPlaneMode::LOITER2QLAND , true , true },
{ _autolandFlightMode , APMPlaneMode::AUTOLAND , true , true },
});

if (!_remapParamNameIntialized) {
Expand Down
4 changes: 4 additions & 0 deletions src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ struct APMPlaneMode
QAUTOTUNE = 22,
QACRO = 23,
THERMAL = 24,
LOITER2QLAND = 25,
AUTOLAND = 26,
};
};

Expand Down Expand Up @@ -91,6 +93,8 @@ class ArduPlaneFirmwarePlugin : public APMFirmwarePlugin
QString _qAutotuneFlightMode ;
QString _qAcroFlightMode ;
QString _thermalFlightMode ;
QString _loiter2qlandFlightMode ;
QString _autolandFlightMode ;
private:
static bool _remapParamNameIntialized;
static FirmwarePlugin::remapParamNameMajorVersionMap_t _remapParamName;
Expand Down

0 comments on commit 8bea6b7

Please sign in to comment.