QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ArduRoverFirmwarePlugin.h
Go to the documentation of this file.
1#pragma once
2
3#include "APMFirmwarePlugin.h"
4
6{
7 enum Mode : uint32_t{
8 MANUAL = 0,
9 ACRO = 1,
10 LEARNING = 2, // Deprecated
12 HOLD = 4,
13 LOITER = 5,
14 FOLLOW = 6,
15 SIMPLE = 7,
16 DOCK = 8,
17 CIRCLE = 9,
18 AUTO = 10,
19 RTL = 11,
21 GUIDED = 15,
23 };
24};
25
27{
28 Q_OBJECT
29
30public:
31 explicit ArduRoverFirmwarePlugin(QObject *parent = nullptr);
33
34 void guidedModeChangeAltitude(Vehicle* vehicle, double altitudeChange, bool pauseVehicle) override;
35 int remapParamNameHigestMinorVersionNumber(int majorVersionNumber) const override;
36 const FirmwarePlugin::remapParamNameMajorVersionMap_t& paramNameRemapMajorVersionMap() const override { return _remapParamName; }
37 bool supportsNegativeThrust(Vehicle*) const override { return true; }
38 bool supportsSmartRTL() const override { return true; }
39 QString offlineEditingParamFile(Vehicle *vehicle) const override { Q_UNUSED(vehicle); return QStringLiteral(":/FirmwarePlugin/APM/Rover.OfflineEditing.params"); }
40
41 QString pauseFlightMode() const override;
42 QString followFlightMode() const override;
43 QString stabilizedFlightMode() const override;
44 void updateAvailableFlightModes(FlightModeList &modeList) override;
45
46protected:
47 uint32_t _convertToCustomFlightModeEnum(uint32_t val) const override;
48
49 const QString _manualFlightMode = tr("Manual");
50 const QString _acroFlightMode = tr("Acro");
51 const QString _learningFlightMode = tr("Learning");
52 const QString _steeringFlightMode = tr("Steering");
53 const QString _holdFlightMode = tr("Hold");
54 const QString _loiterFlightMode = tr("Loiter");
55 const QString _followFlightMode = tr("Follow");
56 const QString _simpleFlightMode = tr("Simple");
57 const QString _dockFlightMode = tr("Dock");
58 const QString _circleFlightMode = tr("Circle");
59 const QString _autoFlightMode = tr("Auto");
60 const QString _rtlFlightMode = tr("RTL");
61 const QString _smartRtlFlightMode = tr("Smart RTL");
62 const QString _guidedFlightMode = tr("Guided");
63 const QString _initializingFlightMode = tr("Initializing");
64
65private:
66 static bool _remapParamNameIntialized;
68};
QList< FirmwareFlightMode > FlightModeList
APMFirmwarePlugin(QObject *parent=nullptr)
All access to singleton is through stack specific implementation.
void pauseVehicle(Vehicle *vehicle) const override
bool supportsNegativeThrust(Vehicle *) const override
QString followFlightMode() const override
Returns the flight mode which the vehicle will be for follow me.
void guidedModeChangeAltitude(Vehicle *vehicle, double altitudeChange, bool pauseVehicle) override
void updateAvailableFlightModes(FlightModeList &modeList) override
Update Available flight modes received from vehicle.
ArduRoverFirmwarePlugin(QObject *parent=nullptr)
QString pauseFlightMode() const override
Returns The flight mode which indicates the vehicle is paused.
int remapParamNameHigestMinorVersionNumber(int majorVersionNumber) const override
QString stabilizedFlightMode() const override
Returns the flight mode for Stabilized.
uint32_t _convertToCustomFlightModeEnum(uint32_t val) const override
const FirmwarePlugin::remapParamNameMajorVersionMap_t & paramNameRemapMajorVersionMap() const override
bool supportsSmartRTL() const override
QString offlineEditingParamFile(Vehicle *vehicle) const override
Return the resource file which contains the set of params loaded for offline editing.
QMap< int, remapParamNameMinorVersionRemapMap_t > remapParamNameMajorVersionMap_t