QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ArduRoverFirmwarePlugin Class Reference

#include <ArduRoverFirmwarePlugin.h>

+ Inheritance diagram for ArduRoverFirmwarePlugin:
+ Collaboration diagram for ArduRoverFirmwarePlugin:

Public Member Functions

 ArduRoverFirmwarePlugin (QObject *parent=nullptr)
 
 ~ArduRoverFirmwarePlugin ()
 
void guidedModeChangeAltitude (Vehicle *vehicle, double altitudeChange, bool pauseVehicle) override
 
int remapParamNameHigestMinorVersionNumber (int majorVersionNumber) const override
 Returns the highest major version number that is known to the remap for this specified major version.
 
const FirmwarePlugin::remapParamNameMajorVersionMap_tparamNameRemapMajorVersionMap () const override
 Returns the mapping structure which is used to map from one parameter name to another based on firmware version.
 
bool supportsNegativeThrust (Vehicle *) 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.
 
QString pauseFlightMode () const override
 Returns The flight mode which indicates the vehicle is paused.
 
QString followFlightMode () const override
 Returns the flight mode which the vehicle will be for follow me.
 
QString stabilizedFlightMode () const override
 Returns the flight mode for Stabilized.
 
void updateAvailableFlightModes (FlightModeList &modeList) override
 Update Available flight modes recieved from vehicle.
 
- Public Member Functions inherited from APMFirmwarePlugin
QList< MAV_CMD > supportedMissionCommands (QGCMAVLink::VehicleClass_t vehicleClass) const override
 List of supported mission commands. Empty list for all commands supported.
 
AutoPilotPluginautopilotPlugin (Vehicle *vehicle) const override
 
bool isCapable (const Vehicle *vehicle, FirmwareCapabilities capabilities) const override
 
void setGuidedMode (Vehicle *vehicle, bool guidedMode) const override
 Set guided flight mode.
 
void guidedModeTakeoff (Vehicle *vehicle, double altitudeRel) const override
 Command vehicle to takeoff from current location to the specified height.
 
void guidedModeGotoLocation (Vehicle *vehicle, const QGeoCoordinate &gotoCoord, double forwardFlightLoiterRadius) const override
 Command vehicle to move to specified location (altitude is included and relative)
 
double minimumTakeoffAltitudeMeters (Vehicle *vehicle) const override
 
void startTakeoff (Vehicle *vehicle) const override
 Command the vehicle to start a takeoff.
 
void startMission (Vehicle *vehicle) const override
 Command the vehicle to start the mission.
 
QStringList flightModes (Vehicle *vehicle) const override
 
QString flightMode (uint8_t base_mode, uint32_t custom_mode) const override
 
bool setFlightMode (const QString &flightMode, uint8_t *base_mode, uint32_t *custom_mode) const override
 
bool MAV_CMD_DO_SET_MODE_is_supported () const override
 returns true if this flight stack supports MAV_CMD_DO_SET_MODE
 
bool isGuidedMode (const Vehicle *vehicle) const override
 Returns whether the vehicle is in guided mode or not.
 
QString gotoFlightMode () const override
 Returns the flight mode which the vehicle will be in if it is performing a goto location.
 
QString rtlFlightMode () const override
 Returns the flight mode for RTL.
 
QString smartRTLFlightMode () const override
 Returns the flight mode for Smart RTL.
 
QString missionFlightMode () const override
 Returns the flight mode for running missions.
 
virtual QString guidedFlightMode () const
 
void pauseVehicle (Vehicle *vehicle) const override
 
void guidedModeRTL (Vehicle *vehicle, bool smartRTL) const override
 Command vehicle to return to launch.
 
void guidedModeChangeHeading (Vehicle *vehicle, const QGeoCoordinate &headingCoord) const override
 Command vehicle to rotate towards specified location.
 
bool adjustIncomingMavlinkMessage (Vehicle *vehicle, mavlink_message_t *message) override
 
void adjustOutgoingMavlinkMessageThreadSafe (Vehicle *vehicle, LinkInterface *outgoingLink, mavlink_message_t *message) override
 
virtual void initializeStreamRates (Vehicle *vehicle)
 
void initializeVehicle (Vehicle *vehicle) override
 Called when Vehicle is first created to perform any firmware specific setup.
 
bool sendHomePositionToVehicle () const override
 
QString missionCommandOverrides (QGCMAVLink::VehicleClass_t vehicleClass) const override
 
QString _internalParameterMetaDataFile (const Vehicle *vehicle) const override
 
FactMetaData_getMetaDataForFact (QObject *parameterMetaData, const QString &name, FactMetaData::ValueType_t type, MAV_TYPE vehicleType) const override
 
void _getParameterMetaDataVersionInfo (const QString &metaDataFile, int &majorVersion, int &minorVersion) const override
 
QObject * _loadParameterMetaData (const QString &metaDataFile) override
 
QString brandImageIndoor (const Vehicle *vehicle) const override
 Return the resource file which contains the brand image for the vehicle for Indoor theme.
 
QString brandImageOutdoor (const Vehicle *vehicle) const override
 Return the resource file which contains the brand image for the vehicle for Outdoor theme.
 
QString getHobbsMeter (Vehicle *vehicle) const override
 gets hobbs meter from autopilot. This should be reimplmeented for each firmware
 
bool hasGripper (const Vehicle *vehicle) const override
 
const QVariantList & toolIndicators (const Vehicle *vehicle) override
 
double maximumEquivalentAirspeed (Vehicle *vehicle) const override
 
double minimumEquivalentAirspeed (Vehicle *vehicle) const override
 
bool fixedWingAirSpeedLimitsAvailable (Vehicle *vehicle) const override
 
void guidedModeChangeEquivalentAirspeedMetersSecond (Vehicle *vehicle, double airspeed_equiv) const override
 
void sendGCSMotionReport (Vehicle *vehicle, const FollowMe::GCSMotionReport &motionReport, uint8_t estimatationCapabilities) const override
 Sends the appropriate mavlink message for follow me support.
 
QVariant expandedToolbarIndicatorSource (const Vehicle *vehicle, const QString &indicatorName) const override
 
bool mulirotorSpeedLimitsAvailable (Vehicle *vehicle) const override
 
double maximumHorizontalSpeedMultirotor (Vehicle *vehicle) const override
 
void guidedModeChangeGroundSpeedMetersSecond (Vehicle *vehicle, double speed) const override
 
- Public Member Functions inherited from FirmwarePlugin
 FirmwarePlugin (QObject *parent=nullptr)
 
virtual ~FirmwarePlugin ()
 
virtual QString landFlightMode () const
 Returns the flight mode for Land.
 
virtual QString takeOffFlightMode () const
 Returns the flight mode for TakeOff.
 
virtual QString motorDetectionFlightMode () const
 Returns the flight mode for Motor Detection.
 
virtual QString takeControlFlightMode () const
 Returns the flight mode to use when the operator wants to take back control from autonomouse flight.
 
virtual void guidedModeLand (Vehicle *vehicle) const
 Command vehicle to land at current location.
 
virtual int defaultJoystickTXMode () const
 
virtual bool supportsThrottleModeCenterZero () const
 
virtual bool supportsRadio () const
 
virtual bool supportsJSButton () const
 
virtual bool supportsMotorInterference () const
 
virtual bool multiRotorCoaxialMotors (Vehicle *) const
 
virtual bool multiRotorXConfig (Vehicle *) const
 
virtual QString vehicleImageOpaque (const Vehicle *) const
 Return the resource file which contains the vehicle icon used in the flight view when the view is dark (Satellite for instance)
 
virtual QString vehicleImageOutline (const Vehicle *) const
 Return the resource file which contains the vehicle icon used in the flight view when the view is light (Map for instance)
 
virtual QGCCameraManagercreateCameraManager (Vehicle *vehicle) const
 Creates vehicle camera manager.
 
virtual MavlinkCameraControlcreateCameraControl (const mavlink_camera_information_t *info, Vehicle *vehicle, int compID, QObject *parent=nullptr) const
 Camera control.
 
virtual QMap< QString, FactGroup * > * factGroups ()
 Returns a pointer to a dictionary of firmware-specific FactGroups.
 
virtual void batteryConsumptionData (Vehicle *vehicle, int &mAhBattery, double &hoverAmps, double &cruiseAmps) const
 
virtual QString autoDisarmParameter (Vehicle *) const
 
virtual bool hasGimbal (Vehicle *vehicle, bool &rollSupported, bool &pitchSupported, bool &yawSupported) const
 
virtual uint32_t highLatencyCustomModeTo32Bits (uint16_t hlCustomMode) const
 Convert from HIGH_LATENCY2.custom_mode value to correct 32 bit value.
 
virtual void checkIfIsLatestStable (Vehicle *vehicle) const
 Used to check if running firmware is latest stable version.
 
int versionCompare (const Vehicle *vehicle, const QString &compare) const
 
int versionCompare (const Vehicle *vehicle, int major, int minor, int patch) const
 
virtual void adjustMetaData (MAV_TYPE, FactMetaData *)
 
virtual AutotunecreateAutotune (Vehicle *vehicle) const
 Creates Autotune object.
 

Protected Member Functions

uint32_t _convertToCustomFlightModeEnum (uint32_t val) const override
 
- Protected Member Functions inherited from APMFirmwarePlugin
 APMFirmwarePlugin (QObject *parent=nullptr)
 All access to singleton is through stack specific implementation.
 
virtual ~APMFirmwarePlugin ()
 
void setSupportedModes (QList< APMCustomMode > supportedModes)
 
- Protected Member Functions inherited from FirmwarePlugin
bool _armVehicleAndValidate (Vehicle *vehicle) const
 
bool _setFlightModeAndValidate (Vehicle *vehicle, const QString &flightMode) const
 
virtual void _versionFileDownloadFinished (const QString &remoteFile, const QString &localFile, const Vehicle *vehicle) const
 Callback to process file with latest release information.
 
void _setModeEnumToModeStringMapping (FlightModeCustomModeMap enumToString)
 
void _updateFlightModeList (FlightModeList &flightModeList)
 
void _addNewFlightMode (FirmwareFlightMode &flightMode)
 

Protected Attributes

const QString _manualFlightMode = tr("Manual")
 
const QString _acroFlightMode = tr("Acro")
 
const QString _learningFlightMode = tr("Learning")
 
const QString _steeringFlightMode = tr("Steering")
 
const QString _holdFlightMode = tr("Hold")
 
const QString _loiterFlightMode = tr("Loiter")
 
const QString _followFlightMode = tr("Follow")
 
const QString _simpleFlightMode = tr("Simple")
 
const QString _dockFlightMode = tr("Dock")
 
const QString _circleFlightMode = tr("Circle")
 
const QString _autoFlightMode = tr("Auto")
 
const QString _rtlFlightMode = tr("RTL")
 
const QString _smartRtlFlightMode = tr("Smart RTL")
 
const QString _guidedFlightMode = tr("Guided")
 
const QString _initializingFlightMode = tr("Initializing")
 
- Protected Attributes inherited from APMFirmwarePlugin
bool _coaxialMotors = false
 
const QString _guidedFlightMode = tr("Guided")
 
const QString _rtlFlightMode = tr("RTL")
 
const QString _smartRtlFlightMode = tr("Smart RTL")
 
const QString _autoFlightMode = tr("Auto")
 
- Protected Attributes inherited from FirmwarePlugin
FlightModeList _flightModeList
 
FlightModeCustomModeMap _modeEnumToString
 
QVariantList _toolIndicatorList
 
QVariantList _modeIndicatorList
 

Additional Inherited Members

- Public Types inherited from FirmwarePlugin
enum  FirmwareCapabilities {
  SetFlightModeCapability = 1 << 0 , PauseVehicleCapability = 1 << 1 , GuidedModeCapability = 1 << 2 , OrbitModeCapability = 1 << 3 ,
  TakeoffVehicleCapability = 1 << 4 , ROIModeCapability = 1 << 5 , ChangeHeadingCapability = 1 << 6 , GuidedTakeoffCapability = 1 << 7
}
 Set of optional capabilites which firmware may support. More...
 
typedef QMap< QString, QString > remapParamNameMap_t
 
typedef QMap< int, remapParamNameMap_tremapParamNameMinorVersionRemapMap_t
 
typedef QMap< int, remapParamNameMinorVersionRemapMap_tremapParamNameMajorVersionMap_t
 
- Signals inherited from FirmwarePlugin
void toolIndicatorsChanged ()
 
- Static Public Member Functions inherited from APMFirmwarePlugin
static QPair< QMetaObject::Connection, QMetaObject::Connection > startCompensatingBaro (Vehicle *vehicle)
 
static bool stopCompensatingBaro (const Vehicle *vehicle, QPair< QMetaObject::Connection, QMetaObject::Connection > updaters)
 
static qreal calcAltOffsetPT (uint32_t atmospheric1, qreal temperature1, uint32_t atmospheric2, qreal temperature2)
 
static qreal calcAltOffsetP (uint32_t atmospheric1, uint32_t atmospheric2)
 

Detailed Description

Definition at line 26 of file ArduRoverFirmwarePlugin.h.

Constructor & Destructor Documentation

◆ ArduRoverFirmwarePlugin()

◆ ~ArduRoverFirmwarePlugin()

ArduRoverFirmwarePlugin::~ArduRoverFirmwarePlugin ( )

Definition at line 54 of file ArduRoverFirmwarePlugin.cc.

Member Function Documentation

◆ _convertToCustomFlightModeEnum()

uint32_t ArduRoverFirmwarePlugin::_convertToCustomFlightModeEnum ( uint32_t  val) const
overrideprotectedvirtual

◆ followFlightMode()

QString ArduRoverFirmwarePlugin::followFlightMode ( void  ) const
overridevirtual

Returns the flight mode which the vehicle will be for follow me.

Reimplemented from FirmwarePlugin.

Definition at line 80 of file ArduRoverFirmwarePlugin.cc.

References _followFlightMode, FirmwarePlugin::_modeEnumToString, and APMRoverMode::FOLLOW.

◆ guidedModeChangeAltitude()

void ArduRoverFirmwarePlugin::guidedModeChangeAltitude ( Vehicle vehicle,
double  altitudeChange,
bool  pauseVehicle 
)
overridevirtual

Command vehicle to change altitude

Parameters
altitudeChangeIf > 0, go up by amount specified, if < 0, go down by amount specified
pauseVehicletrue: pause vehicle prior to altitude change

Reimplemented from APMFirmwarePlugin.

Definition at line 65 of file ArduRoverFirmwarePlugin.cc.

References qgcApp.

◆ offlineEditingParamFile()

QString ArduRoverFirmwarePlugin::offlineEditingParamFile ( Vehicle ) const
inlineoverridevirtual

Return the resource file which contains the set of params loaded for offline editing.

Reimplemented from FirmwarePlugin.

Definition at line 39 of file ArduRoverFirmwarePlugin.h.

◆ paramNameRemapMajorVersionMap()

const FirmwarePlugin::remapParamNameMajorVersionMap_t & ArduRoverFirmwarePlugin::paramNameRemapMajorVersionMap ( void  ) const
inlineoverridevirtual

Returns the mapping structure which is used to map from one parameter name to another based on firmware version.

Reimplemented from FirmwarePlugin.

Definition at line 36 of file ArduRoverFirmwarePlugin.h.

◆ pauseFlightMode()

QString ArduRoverFirmwarePlugin::pauseFlightMode ( void  ) const
overridevirtual

Returns The flight mode which indicates the vehicle is paused.

Reimplemented from FirmwarePlugin.

Definition at line 75 of file ArduRoverFirmwarePlugin.cc.

References _holdFlightMode, FirmwarePlugin::_modeEnumToString, and APMRoverMode::HOLD.

◆ remapParamNameHigestMinorVersionNumber()

int ArduRoverFirmwarePlugin::remapParamNameHigestMinorVersionNumber ( int  ) const
overridevirtual

Returns the highest major version number that is known to the remap for this specified major version.

Reimplemented from FirmwarePlugin.

Definition at line 59 of file ArduRoverFirmwarePlugin.cc.

References Vehicle::versionNotSetValue.

◆ stabilizedFlightMode()

QString ArduRoverFirmwarePlugin::stabilizedFlightMode ( void  ) const
overridevirtual

Returns the flight mode for Stabilized.

Reimplemented from FirmwarePlugin.

Definition at line 70 of file ArduRoverFirmwarePlugin.cc.

References _manualFlightMode, FirmwarePlugin::_modeEnumToString, and APMRoverMode::MANUAL.

◆ supportsNegativeThrust()

bool ArduRoverFirmwarePlugin::supportsNegativeThrust ( Vehicle ) const
inlineoverridevirtual

Returns true if the vehicle and firmware supports the use of negative thrust Typically supported rover.

Reimplemented from FirmwarePlugin.

Definition at line 37 of file ArduRoverFirmwarePlugin.h.

◆ supportsSmartRTL()

bool ArduRoverFirmwarePlugin::supportsSmartRTL ( ) const
inlineoverridevirtual

Reimplemented from FirmwarePlugin.

Definition at line 38 of file ArduRoverFirmwarePlugin.h.

◆ updateAvailableFlightModes()

void ArduRoverFirmwarePlugin::updateAvailableFlightModes ( FlightModeList flightModeList)
overridevirtual

Update Available flight modes recieved from vehicle.

Reimplemented from FirmwarePlugin.

Definition at line 85 of file ArduRoverFirmwarePlugin.cc.

References FirmwarePlugin::_updateFlightModeList().

Referenced by ArduRoverFirmwarePlugin().

Member Data Documentation

◆ _acroFlightMode

const QString ArduRoverFirmwarePlugin::_acroFlightMode = tr("Acro")
protected

Definition at line 50 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _autoFlightMode

const QString ArduRoverFirmwarePlugin::_autoFlightMode = tr("Auto")
protected

Definition at line 59 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _circleFlightMode

const QString ArduRoverFirmwarePlugin::_circleFlightMode = tr("Circle")
protected

Definition at line 58 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _dockFlightMode

const QString ArduRoverFirmwarePlugin::_dockFlightMode = tr("Dock")
protected

Definition at line 57 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _followFlightMode

const QString ArduRoverFirmwarePlugin::_followFlightMode = tr("Follow")
protected

Definition at line 55 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin(), and followFlightMode().

◆ _guidedFlightMode

const QString ArduRoverFirmwarePlugin::_guidedFlightMode = tr("Guided")
protected

Definition at line 62 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _holdFlightMode

const QString ArduRoverFirmwarePlugin::_holdFlightMode = tr("Hold")
protected

Definition at line 53 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin(), and pauseFlightMode().

◆ _initializingFlightMode

const QString ArduRoverFirmwarePlugin::_initializingFlightMode = tr("Initializing")
protected

Definition at line 63 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _learningFlightMode

const QString ArduRoverFirmwarePlugin::_learningFlightMode = tr("Learning")
protected

Definition at line 51 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _loiterFlightMode

const QString ArduRoverFirmwarePlugin::_loiterFlightMode = tr("Loiter")
protected

Definition at line 54 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _manualFlightMode

const QString ArduRoverFirmwarePlugin::_manualFlightMode = tr("Manual")
protected

Definition at line 49 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin(), and stabilizedFlightMode().

◆ _rtlFlightMode

const QString ArduRoverFirmwarePlugin::_rtlFlightMode = tr("RTL")
protected

Definition at line 60 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _simpleFlightMode

const QString ArduRoverFirmwarePlugin::_simpleFlightMode = tr("Simple")
protected

Definition at line 56 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _smartRtlFlightMode

const QString ArduRoverFirmwarePlugin::_smartRtlFlightMode = tr("Smart RTL")
protected

Definition at line 61 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().

◆ _steeringFlightMode

const QString ArduRoverFirmwarePlugin::_steeringFlightMode = tr("Steering")
protected

Definition at line 52 of file ArduRoverFirmwarePlugin.h.

Referenced by ArduRoverFirmwarePlugin().


The documentation for this class was generated from the following files: