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

This is the base class for all stack specific APM firmware plugins. More...

#include <APMFirmwarePlugin.h>

+ Inheritance diagram for APMFirmwarePlugin:
+ Collaboration diagram for APMFirmwarePlugin:

Public Member Functions

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 guidedModeChangeAltitude (Vehicle *vehicle, double altitudeChange, bool pauseVehicle) override
 
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 pauseFlightMode () const
 Returns The flight mode which indicates the vehicle is paused.
 
virtual bool supportsSmartRTL () const
 
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 stabilizedFlightMode () const
 Returns the flight mode for Stabilized.
 
virtual QString takeControlFlightMode () const
 Returns the flight mode to use when the operator wants to take back control from autonomouse flight.
 
virtual QString followFlightMode () const
 Returns the flight mode which the vehicle will be for follow me.
 
virtual void guidedModeLand (Vehicle *vehicle) const
 Command vehicle to land at current location.
 
virtual int defaultJoystickTXMode () const
 
virtual bool supportsThrottleModeCenterZero () const
 
virtual bool supportsNegativeThrust (Vehicle *) const
 
virtual bool supportsRadio () const
 
virtual bool supportsJSButton () const
 
virtual bool supportsMotorInterference () const
 
virtual const remapParamNameMajorVersionMap_tparamNameRemapMajorVersionMap () const
 Returns the mapping structure which is used to map from one parameter name to another based on firmware version.
 
virtual int remapParamNameHigestMinorVersionNumber (int) const
 Returns the highest major version number that is known to the remap for this specified major version.
 
virtual bool multiRotorCoaxialMotors (Vehicle *) const
 
virtual bool multiRotorXConfig (Vehicle *) const
 
virtual QString offlineEditingParamFile (Vehicle *) const
 Return the resource file which contains the set of params loaded for offline editing.
 
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.
 
virtual void updateAvailableFlightModes (FlightModeList &flightModeList)
 Update Available flight modes recieved from vehicle.
 

Static Public Member Functions

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)
 

Protected Member Functions

 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)
 
virtual uint32_t _convertToCustomFlightModeEnum (uint32_t val) const
 
void _updateFlightModeList (FlightModeList &flightModeList)
 
void _addNewFlightMode (FirmwareFlightMode &flightMode)
 

Protected Attributes

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 ()
 

Detailed Description

This is the base class for all stack specific APM firmware plugins.

Definition at line 24 of file APMFirmwarePlugin.h.

Constructor & Destructor Documentation

◆ APMFirmwarePlugin()

APMFirmwarePlugin::APMFirmwarePlugin ( QObject *  parent = nullptr)
explicitprotected

All access to singleton is through stack specific implementation.

Definition at line 30 of file APMFirmwarePlugin.cc.

References APMCustomMode::AUTO, APMCustomMode::GUIDED, APMCustomMode::RTL, and APMCustomMode::SMART_RTL.

◆ ~APMFirmwarePlugin()

APMFirmwarePlugin::~APMFirmwarePlugin ( )
protectedvirtual

Definition at line 51 of file APMFirmwarePlugin.cc.

Member Function Documentation

◆ _getMetaDataForFact()

FactMetaData * APMFirmwarePlugin::_getMetaDataForFact ( QObject *  ,
const QString &  ,
FactMetaData::ValueType_t  ,
MAV_TYPE   
) const
overridevirtual

Returns the FactMetaData associated with the parameter name

Parameters
opaqueParameterMetaDataOpaque pointer returned from loadParameterMetaData Important: Only CompInfoParam code should use this method

Reimplemented from FirmwarePlugin.

Definition at line 516 of file APMFirmwarePlugin.cc.

References APMParameterMetaData::getMetaDataForFact().

◆ _getParameterMetaDataVersionInfo()

void APMFirmwarePlugin::_getParameterMetaDataVersionInfo ( const QString &  metaDataFile,
int &  majorVersion,
int &  minorVersion 
) const
overridevirtual

Returns the parameter set version info pulled from inside the meta data file. -1 if not found. Note: The implementation for this must not vary by vehicle type. Important: Only CompInfoParam code should use this method

Reimplemented from FirmwarePlugin.

Definition at line 529 of file APMFirmwarePlugin.cc.

References APMParameterMetaData::getParameterMetaDataVersionInfo().

◆ _internalParameterMetaDataFile()

QString APMFirmwarePlugin::_internalParameterMetaDataFile ( const Vehicle ) const
overridevirtual

Returns the internal resource parameter meta date file. Important: Only CompInfoParam code should use this method

Reimplemented from FirmwarePlugin.

Definition at line 718 of file APMFirmwarePlugin.cc.

References Vehicle::firmwareMajorVersion(), Vehicle::firmwareMinorVersion(), QGCMAVLink::vehicleClass(), and Vehicle::vehicleType().

◆ _loadParameterMetaData()

QObject * APMFirmwarePlugin::_loadParameterMetaData ( const QString &  )
overridevirtual

Loads the specified parameter meta data file.

Returns
Opaque parameter meta data information which must be stored with Vehicle. Vehicle is responsible to call deleteParameterMetaData when no longer needed. Important: Only CompInfoParam code should use this method

Reimplemented from FirmwarePlugin.

Definition at line 613 of file APMFirmwarePlugin.cc.

References APMParameterMetaData::loadParameterFactMetaDataFile().

◆ adjustIncomingMavlinkMessage()

bool APMFirmwarePlugin::adjustIncomingMavlinkMessage ( Vehicle ,
mavlink_message_t  
)
overridevirtual

Called before any mavlink message is processed by Vehicle such that the firmwre plugin can adjust any message characteristics. This is handy to adjust or differences in mavlink spec implementations such that the base code can remain mavlink generic.

Parameters
vehicleVehicle message came from
message[in,out]Mavlink message to adjust if needed.
Returns
false: skip message, true: process message

Reimplemented from FirmwarePlugin.

Reimplemented in ArduSubFirmwarePlugin.

Definition at line 285 of file APMFirmwarePlugin.cc.

References Vehicle::firmwarePluginInstanceData(), Vehicle::id(), and initializeStreamRates().

Referenced by ArduSubFirmwarePlugin::adjustIncomingMavlinkMessage().

◆ adjustOutgoingMavlinkMessageThreadSafe()

void APMFirmwarePlugin::adjustOutgoingMavlinkMessageThreadSafe ( Vehicle ,
LinkInterface ,
mavlink_message_t  
)
overridevirtual

Called before any mavlink message is sent to the Vehicle so plugin can adjust any message characteristics. This is handy to adjust or differences in mavlink spec implementations such that the base code can remain mavlink generic.

This method must be thread safe.

@param vehicle Vehicle message came from
@param outgoingLink Link that messae is going out on
@param message[in,out] Mavlink message to adjust if needed. 

Reimplemented from FirmwarePlugin.

Definition at line 325 of file APMFirmwarePlugin.cc.

◆ autopilotPlugin()

AutoPilotPlugin * APMFirmwarePlugin::autopilotPlugin ( Vehicle vehicle) const
overridevirtual
Returns
The AutoPilotPlugin associated with this firmware plugin. Must be overridden.

Reimplemented from FirmwarePlugin.

Definition at line 56 of file APMFirmwarePlugin.cc.

◆ brandImageIndoor()

QString APMFirmwarePlugin::brandImageIndoor ( const Vehicle ) const
inlineoverridevirtual

Return the resource file which contains the brand image for the vehicle for Indoor theme.

Reimplemented from FirmwarePlugin.

Reimplemented in ArduSubFirmwarePlugin.

Definition at line 62 of file APMFirmwarePlugin.h.

◆ brandImageOutdoor()

QString APMFirmwarePlugin::brandImageOutdoor ( const Vehicle ) const
inlineoverridevirtual

Return the resource file which contains the brand image for the vehicle for Outdoor theme.

Reimplemented from FirmwarePlugin.

Reimplemented in ArduSubFirmwarePlugin.

Definition at line 63 of file APMFirmwarePlugin.h.

◆ calcAltOffsetP()

qreal APMFirmwarePlugin::calcAltOffsetP ( uint32_t  atmospheric1,
uint32_t  atmospheric2 
)
static

Definition at line 1314 of file APMFirmwarePlugin.cc.

Referenced by startCompensatingBaro().

◆ calcAltOffsetPT()

qreal APMFirmwarePlugin::calcAltOffsetPT ( uint32_t  atmospheric1,
qreal  temperature1,
uint32_t  atmospheric2,
qreal  temperature2 
)
static

Definition at line 1306 of file APMFirmwarePlugin.cc.

Referenced by startCompensatingBaro().

◆ expandedToolbarIndicatorSource()

QVariant APMFirmwarePlugin::expandedToolbarIndicatorSource ( const Vehicle vehicle,
const QString &  indicatorName 
) const
overridevirtual

Reimplemented from FirmwarePlugin.

Definition at line 1386 of file APMFirmwarePlugin.cc.

References Vehicle::multiRotor().

◆ fixedWingAirSpeedLimitsAvailable()

bool APMFirmwarePlugin::fixedWingAirSpeedLimitsAvailable ( Vehicle ) const
overridevirtual
Returns
Return true if we have received the airspeed limits for fixed wing.

Reimplemented from FirmwarePlugin.

Definition at line 1252 of file APMFirmwarePlugin.cc.

References ParameterManager::defaultComponentId, ParameterManager::parameterExists(), and Vehicle::parameterManager().

◆ flightMode()

QString APMFirmwarePlugin::flightMode ( uint8_t  base_mode,
uint32_t  custom_mode 
) const
overridevirtual

Returns the name for this flight mode. Flight mode names must be human readable as well as audio speakable.

Parameters
base_modeBase mode from mavlink HEARTBEAT message
custom_modeCustom mode from mavlink HEARTBEAT message

Reimplemented from FirmwarePlugin.

Definition at line 92 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and flightMode().

Referenced by flightMode(), and setFlightMode().

◆ flightModes()

QStringList APMFirmwarePlugin::flightModes ( Vehicle ) const
overridevirtual

Returns the list of available flight modes for the Fly View dropdown. This may or may not be the full list available from the firmware. Call will be made again if advanced mode changes.

Reimplemented from FirmwarePlugin.

Definition at line 80 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_flightModeList.

◆ getHobbsMeter()

QString APMFirmwarePlugin::getHobbsMeter ( Vehicle vehicle) const
overridevirtual

gets hobbs meter from autopilot. This should be reimplmeented for each firmware

Reimplemented from FirmwarePlugin.

Definition at line 622 of file APMFirmwarePlugin.cc.

References ParameterManager::defaultComponentId, ParameterManager::getParameter(), ParameterManager::parameterExists(), and Vehicle::parameterManager().

◆ gotoFlightMode()

QString APMFirmwarePlugin::gotoFlightMode ( void  ) const
inlineoverridevirtual

Returns the flight mode which the vehicle will be in if it is performing a goto location.

Reimplemented from FirmwarePlugin.

Reimplemented in ArduCopterFirmwarePlugin.

Definition at line 43 of file APMFirmwarePlugin.h.

References guidedFlightMode().

◆ guidedFlightMode()

◆ guidedModeChangeAltitude()

void APMFirmwarePlugin::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 FirmwarePlugin.

Reimplemented in ArduRoverFirmwarePlugin.

Definition at line 864 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_setFlightModeAndValidate(), Vehicle::defaultComponentId(), MAVLinkProtocol::getComponentId(), Vehicle::id(), MAVLinkProtocol::instance(), FirmwarePlugin::pauseFlightMode(), pauseVehicle(), VehicleLinkManager::primaryLink(), qgcApp, Vehicle::sendMessageOnLinkThreadSafe(), setGuidedMode(), and Vehicle::vehicleLinkManager().

◆ guidedModeChangeEquivalentAirspeedMetersSecond()

void APMFirmwarePlugin::guidedModeChangeEquivalentAirspeedMetersSecond ( Vehicle vehicle,
double  airspeed_equiv 
) const
overridevirtual

Command vehicle to change equivalent airspeed

Parameters
airspeed_equivEquivalent airspeed in m/s

Reimplemented from FirmwarePlugin.

Definition at line 1258 of file APMFirmwarePlugin.cc.

References Vehicle::defaultComponentId(), and Vehicle::sendMavCommand().

◆ guidedModeChangeGroundSpeedMetersSecond()

void APMFirmwarePlugin::guidedModeChangeGroundSpeedMetersSecond ( Vehicle vehicle,
double  groundspeed 
) const
overridevirtual

Command vehicle to change groundspeed

Parameters
groundspeedGroundspeed in m/s

Reimplemented from FirmwarePlugin.

Definition at line 926 of file APMFirmwarePlugin.cc.

References Vehicle::defaultComponentId(), and Vehicle::sendMavCommand().

◆ guidedModeChangeHeading()

void APMFirmwarePlugin::guidedModeChangeHeading ( Vehicle vehicle,
const QGeoCoordinate &  headingCoord 
) const
overridevirtual

◆ guidedModeGotoLocation()

void APMFirmwarePlugin::guidedModeGotoLocation ( Vehicle vehicle,
const QGeoCoordinate &  gotoCoord,
double  forwardFlightLoiterRadius 
) const
overridevirtual

◆ guidedModeRTL()

void APMFirmwarePlugin::guidedModeRTL ( Vehicle vehicle,
bool  smartRTL 
) const
overridevirtual

Command vehicle to return to launch.

Reimplemented from FirmwarePlugin.

Definition at line 859 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_setFlightModeAndValidate(), rtlFlightMode(), and smartRTLFlightMode().

◆ guidedModeTakeoff()

void APMFirmwarePlugin::guidedModeTakeoff ( Vehicle vehicle,
double  takeoffAltRel 
) const
overridevirtual

Command vehicle to takeoff from current location to the specified height.

Reimplemented from FirmwarePlugin.

Definition at line 940 of file APMFirmwarePlugin.cc.

◆ hasGripper()

bool APMFirmwarePlugin::hasGripper ( const Vehicle ) const
overridevirtual
Returns
Return true if the GCS has enabled Grip_enable option

Reimplemented from FirmwarePlugin.

Definition at line 640 of file APMFirmwarePlugin.cc.

References ParameterManager::defaultComponentId, ParameterManager::getParameter(), ParameterManager::parameterExists(), and Vehicle::parameterManager().

◆ initializeStreamRates()

◆ initializeVehicle()

void APMFirmwarePlugin::initializeVehicle ( Vehicle )
overridevirtual

Called when Vehicle is first created to perform any firmware specific setup.

Reimplemented from FirmwarePlugin.

Definition at line 499 of file APMFirmwarePlugin.cc.

References initializeStreamRates(), Vehicle::isOfflineEditingVehicle(), FirmwarePlugin::offlineEditingParamFile(), Vehicle::setFirmwareVersion(), and VideoSettings::videoSource3DRSolo.

◆ isCapable()

◆ isGuidedMode()

bool APMFirmwarePlugin::isGuidedMode ( const Vehicle ) const
overridevirtual

Returns whether the vehicle is in guided mode or not.

Reimplemented from FirmwarePlugin.

Definition at line 662 of file APMFirmwarePlugin.cc.

References Vehicle::flightMode(), and guidedFlightMode().

◆ MAV_CMD_DO_SET_MODE_is_supported()

bool APMFirmwarePlugin::MAV_CMD_DO_SET_MODE_is_supported ( ) const
inlineoverridevirtual

returns true if this flight stack supports MAV_CMD_DO_SET_MODE

Reimplemented from FirmwarePlugin.

Definition at line 41 of file APMFirmwarePlugin.h.

◆ maximumEquivalentAirspeed()

double APMFirmwarePlugin::maximumEquivalentAirspeed ( Vehicle ) const
overridevirtual

◆ maximumHorizontalSpeedMultirotor()

double APMFirmwarePlugin::maximumHorizontalSpeedMultirotor ( Vehicle ) const
overridevirtual

◆ minimumEquivalentAirspeed()

double APMFirmwarePlugin::minimumEquivalentAirspeed ( Vehicle ) const
overridevirtual

◆ minimumTakeoffAltitudeMeters()

double APMFirmwarePlugin::minimumTakeoffAltitudeMeters ( Vehicle ) const
overridevirtual

◆ missionCommandOverrides()

QString APMFirmwarePlugin::missionCommandOverrides ( QGCMAVLink::VehicleClass_t  vehicleClass) const
overridevirtual

Returns the name of the mission command json override file for the specified vehicle type.

Parameters
vehicleClassVehicle class to return file for, VehicleClassGeneric is a request for overrides for all vehicle types

Reimplemented from FirmwarePlugin.

Definition at line 592 of file APMFirmwarePlugin.cc.

References QGCMAVLink::VehicleClassFixedWing, QGCMAVLink::VehicleClassGeneric, QGCMAVLink::VehicleClassMultiRotor, QGCMAVLink::VehicleClassRoverBoat, QGCMAVLink::VehicleClassSub, and QGCMAVLink::VehicleClassVTOL.

◆ missionFlightMode()

QString APMFirmwarePlugin::missionFlightMode ( void  ) const
overridevirtual

Returns the flight mode for running missions.

Reimplemented from FirmwarePlugin.

Definition at line 677 of file APMFirmwarePlugin.cc.

References _autoFlightMode, FirmwarePlugin::_convertToCustomFlightModeEnum(), FirmwarePlugin::_modeEnumToString, and APMCustomMode::AUTO.

Referenced by startMission().

◆ mulirotorSpeedLimitsAvailable()

bool APMFirmwarePlugin::mulirotorSpeedLimitsAvailable ( Vehicle ) const
overridevirtual
Returns
Return true if we have received the ground speed limits for the mulirotor.

Reimplemented from FirmwarePlugin.

Definition at line 910 of file APMFirmwarePlugin.cc.

References ParameterManager::defaultComponentId, ParameterManager::parameterExists(), and Vehicle::parameterManager().

◆ pauseVehicle()

void APMFirmwarePlugin::pauseVehicle ( Vehicle vehicle) const
overridevirtual

Causes the vehicle to stop at current position. If guide mode is supported, vehicle will be let in guide mode. If not, vehicle will be left in Loiter.

Reimplemented from FirmwarePlugin.

Definition at line 767 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_setFlightModeAndValidate(), and FirmwarePlugin::pauseFlightMode().

Referenced by guidedModeChangeAltitude(), and setGuidedMode().

◆ rtlFlightMode()

QString APMFirmwarePlugin::rtlFlightMode ( void  ) const
overridevirtual

Returns the flight mode for RTL.

Reimplemented from FirmwarePlugin.

Definition at line 667 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_convertToCustomFlightModeEnum(), FirmwarePlugin::_modeEnumToString, _rtlFlightMode, and APMCustomMode::RTL.

Referenced by guidedModeRTL().

◆ sendGCSMotionReport()

◆ sendHomePositionToVehicle()

bool APMFirmwarePlugin::sendHomePositionToVehicle ( void  ) const
inlineoverridevirtual

Determines how to handle the first item of the mission item list. Internally to QGC the first item is always the home position. Generic stack does not want home position sent in the first position. Subsequent sequence numbers must be adjusted. This is the mavlink spec default.

Returns
true: Send first mission item as home position to vehicle. When vehicle has no mission items on it, it may or may not return a home position back in position 0. false: Do not send first item to vehicle, sequence numbers must be adjusted

Reimplemented from FirmwarePlugin.

Definition at line 56 of file APMFirmwarePlugin.h.

◆ setFlightMode()

bool APMFirmwarePlugin::setFlightMode ( const QString &  flightMode,
uint8_t *  base_mode,
uint32_t *  custom_mode 
) const
overridevirtual

Sets base_mode and custom_mode to specified flight mode.

Parameters
[out]base_modeBase mode for SET_MODE mavlink message
[out]custom_modeCustom mode for SET_MODE mavlink message

Reimplemented from FirmwarePlugin.

Definition at line 102 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_flightModeList, and flightMode().

◆ setGuidedMode()

void APMFirmwarePlugin::setGuidedMode ( Vehicle vehicle,
bool  guidedMode 
) const
overridevirtual

Set guided flight mode.

Reimplemented from FirmwarePlugin.

Definition at line 758 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_setFlightModeAndValidate(), guidedFlightMode(), and pauseVehicle().

Referenced by guidedModeChangeAltitude(), and guidedModeGotoLocation().

◆ setSupportedModes()

void APMFirmwarePlugin::setSupportedModes ( QList< APMCustomMode supportedModes)
inlineprotected

Definition at line 89 of file APMFirmwarePlugin.h.

◆ smartRTLFlightMode()

QString APMFirmwarePlugin::smartRTLFlightMode ( ) const
overridevirtual

Returns the flight mode for Smart RTL.

Reimplemented from FirmwarePlugin.

Definition at line 672 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::_convertToCustomFlightModeEnum(), FirmwarePlugin::_modeEnumToString, _smartRtlFlightMode, and APMCustomMode::SMART_RTL.

Referenced by guidedModeRTL().

◆ startCompensatingBaro()

◆ startMission()

void APMFirmwarePlugin::startMission ( Vehicle vehicle) const
overridevirtual

◆ startTakeoff()

void APMFirmwarePlugin::startTakeoff ( Vehicle vehicle) const
overridevirtual

◆ stopCompensatingBaro()

bool APMFirmwarePlugin::stopCompensatingBaro ( const Vehicle vehicle,
QPair< QMetaObject::Connection, QMetaObject::Connection >  updaters 
)
static

Definition at line 1366 of file APMFirmwarePlugin.cc.

◆ supportedMissionCommands()

QList< MAV_CMD > APMFirmwarePlugin::supportedMissionCommands ( QGCMAVLink::VehicleClass_t  ) const
overridevirtual

List of supported mission commands. Empty list for all commands supported.

Reimplemented from FirmwarePlugin.

Definition at line 534 of file APMFirmwarePlugin.cc.

References QGCMAVLink::VehicleClassFixedWing, QGCMAVLink::VehicleClassGeneric, QGCMAVLink::VehicleClassMultiRotor, and QGCMAVLink::VehicleClassVTOL.

◆ toolIndicators()

const QVariantList & APMFirmwarePlugin::toolIndicators ( const Vehicle vehicle)
overridevirtual

Returns the list of toolbar tool indicators associated with a vehicle signals toolIndicatorsChanged

Returns
A list of QUrl with the indicators

Reimplemented from FirmwarePlugin.

Definition at line 649 of file APMFirmwarePlugin.cc.

References FirmwarePlugin::toolIndicators().

Member Data Documentation

◆ _autoFlightMode

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

Definition at line 96 of file APMFirmwarePlugin.h.

Referenced by missionFlightMode().

◆ _coaxialMotors

bool APMFirmwarePlugin::_coaxialMotors = false
protected

◆ _guidedFlightMode

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

Definition at line 93 of file APMFirmwarePlugin.h.

Referenced by guidedFlightMode().

◆ _rtlFlightMode

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

Definition at line 94 of file APMFirmwarePlugin.h.

Referenced by rtlFlightMode().

◆ _smartRtlFlightMode

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

Definition at line 95 of file APMFirmwarePlugin.h.

Referenced by smartRTLFlightMode().


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