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

#include <PX4FirmwarePlugin.h>

+ Inheritance diagram for PX4FirmwarePlugin:
+ Collaboration diagram for PX4FirmwarePlugin:

Public Member Functions

 PX4FirmwarePlugin ()
 
virtual ~PX4FirmwarePlugin ()
 
void _changeAltAfterPause (void *resultHandlerData, bool pauseSucceeded)
 
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
 
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
 
void setGuidedMode (Vehicle *vehicle, bool guidedMode) const override
 Set guided flight mode.
 
QString pauseFlightMode (void) const override
 Returns The flight mode which indicates the vehicle is paused.
 
QString missionFlightMode (void) const override
 Returns the flight mode for running missions.
 
QString rtlFlightMode (void) const override
 Returns the flight mode for RTL.
 
QString landFlightMode (void) const override
 Returns the flight mode for Land.
 
QString takeControlFlightMode (void) const override
 Returns the flight mode to use when the operator wants to take back control from autonomouse flight.
 
QString gotoFlightMode (void) const override
 Returns the flight mode which the vehicle will be in if it is performing a goto location.
 
QString followFlightMode (void) const override
 Returns the flight mode which the vehicle will be for follow me.
 
QString takeOffFlightMode (void) const override
 Returns the flight mode for TakeOff.
 
QString stabilizedFlightMode (void) const override
 Returns the flight mode for Stabilized.
 
void pauseVehicle (Vehicle *vehicle) const override
 
void guidedModeRTL (Vehicle *vehicle, bool smartRTL) const override
 Command vehicle to return to launch.
 
void guidedModeLand (Vehicle *vehicle) const override
 Command vehicle to land at current location.
 
void guidedModeTakeoff (Vehicle *vehicle, double takeoffAltRel) const override
 Command vehicle to takeoff from current location to the specified height.
 
double maximumHorizontalSpeedMultirotor (Vehicle *vehicle) const override
 
double maximumEquivalentAirspeed (Vehicle *vehicle) const override
 
double minimumEquivalentAirspeed (Vehicle *vehicle) const override
 
bool mulirotorSpeedLimitsAvailable (Vehicle *vehicle) const override
 
bool fixedWingAirSpeedLimitsAvailable (Vehicle *vehicle) const override
 
void guidedModeGotoLocation (Vehicle *vehicle, const QGeoCoordinate &gotoCoord, double forwardFlightLoiterRadius) const override
 Command vehicle to move to specified location (altitude is included and relative)
 
void guidedModeChangeAltitude (Vehicle *vehicle, double altitudeRel, bool pauseVehicle) override
 
void guidedModeChangeGroundSpeedMetersSecond (Vehicle *vehicle, double groundspeed) const override
 
void guidedModeChangeEquivalentAirspeedMetersSecond (Vehicle *vehicle, double airspeed_equiv) const override
 
void guidedModeChangeHeading (Vehicle *vehicle, const QGeoCoordinate &headingCoord) const override
 Command vehicle to rotate towards specified location.
 
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.
 
bool isGuidedMode (const Vehicle *vehicle) const override
 Returns whether the vehicle is in guided mode or not.
 
void initializeVehicle (Vehicle *vehicle) override
 Called when Vehicle is first created to perform any firmware specific setup.
 
bool sendHomePositionToVehicle (void) const override
 
QString missionCommandOverrides (QGCMAVLink::VehicleClass_t vehicleClass) const override
 
FactMetaData_getMetaDataForFact (QObject *parameterMetaData, const QString &name, FactMetaData::ValueType_t type, MAV_TYPE vehicleType) const override
 
QString _internalParameterMetaDataFile (const Vehicle *vehicle) const override
 
void _getParameterMetaDataVersionInfo (const QString &metaDataFile, int &majorVersion, int &minorVersion) const override
 
QObject * _loadParameterMetaData (const QString &metaDataFile) final
 
bool adjustIncomingMavlinkMessage (Vehicle *vehicle, mavlink_message_t *message) override
 
QString offlineEditingParamFile (Vehicle *vehicle) const override
 Return the resource file which contains the set of params loaded for offline editing.
 
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 autoDisarmParameter (Vehicle *vehicle) const override
 
uint32_t highLatencyCustomModeTo32Bits (uint16_t hlCustomMode) const override
 Convert from HIGH_LATENCY2.custom_mode value to correct 32 bit value.
 
bool supportsNegativeThrust (Vehicle *vehicle) const override
 
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
 
QVariant expandedToolbarIndicatorSource (const Vehicle *vehicle, const QString &indicatorName) const override
 
void updateAvailableFlightModes (FlightModeList &modeList) override
 Update Available flight modes recieved from vehicle.
 
- Public Member Functions inherited from FirmwarePlugin
 FirmwarePlugin (QObject *parent=nullptr)
 
virtual ~FirmwarePlugin ()
 
virtual bool MAV_CMD_DO_SET_MODE_is_supported () const
 returns true if this flight stack supports MAV_CMD_DO_SET_MODE
 
virtual QString smartRTLFlightMode () const
 Returns the flight mode for Smart RTL.
 
virtual bool supportsSmartRTL () const
 
virtual QString motorDetectionFlightMode () const
 Returns the flight mode for Motor Detection.
 
virtual double minimumTakeoffAltitudeMeters (Vehicle *) const
 
virtual int defaultJoystickTXMode () const
 
virtual bool supportsThrottleModeCenterZero () const
 
virtual bool supportsRadio () const
 
virtual bool supportsJSButton () const
 
virtual bool supportsMotorInterference () const
 
virtual void adjustOutgoingMavlinkMessageThreadSafe (Vehicle *, LinkInterface *, mavlink_message_t *)
 
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 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 const QVariantList & toolIndicators (const Vehicle *vehicle)
 
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 bool hasGimbal (Vehicle *vehicle, bool &rollSupported, bool &pitchSupported, bool &yawSupported) const
 
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 void sendGCSMotionReport (Vehicle *vehicle, const FollowMe::GCSMotionReport &motionReport, uint8_t estimationCapabilities) const
 Sends the appropriate mavlink message for follow me support.
 
virtual AutotunecreateAutotune (Vehicle *vehicle) const
 Creates Autotune object.
 

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 ()
 
- 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 inherited from FirmwarePlugin
FlightModeList _flightModeList
 
FlightModeCustomModeMap _modeEnumToString
 
QVariantList _toolIndicatorList
 
QVariantList _modeIndicatorList
 

Detailed Description

Definition at line 6 of file PX4FirmwarePlugin.h.

Constructor & Destructor Documentation

◆ PX4FirmwarePlugin()

◆ ~PX4FirmwarePlugin()

PX4FirmwarePlugin::~PX4FirmwarePlugin ( )
virtual

Definition at line 89 of file PX4FirmwarePlugin.cc.

Member Function Documentation

◆ _changeAltAfterPause()

void PX4FirmwarePlugin::_changeAltAfterPause ( void *  resultHandlerData,
bool  pauseSucceeded 
)

◆ _getMetaDataForFact()

FactMetaData * PX4FirmwarePlugin::_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 180 of file PX4FirmwarePlugin.cc.

References PX4ParameterMetaData::getMetaDataForFact().

◆ _getParameterMetaDataVersionInfo()

void PX4FirmwarePlugin::_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 193 of file PX4FirmwarePlugin.cc.

References PX4ParameterMetaData::getParameterMetaDataVersionInfo().

◆ _internalParameterMetaDataFile()

QString PX4FirmwarePlugin::_internalParameterMetaDataFile ( const Vehicle ) const
inlineoverridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 57 of file PX4FirmwarePlugin.h.

◆ _loadParameterMetaData()

QObject * PX4FirmwarePlugin::_loadParameterMetaData ( const QString &  )
finalvirtual

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 270 of file PX4FirmwarePlugin.cc.

References PX4ParameterMetaData::loadParameterFactMetaDataFile().

◆ adjustIncomingMavlinkMessage()

bool PX4FirmwarePlugin::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.

Definition at line 644 of file PX4FirmwarePlugin.cc.

◆ autoDisarmParameter()

QString PX4FirmwarePlugin::autoDisarmParameter ( Vehicle vehicle) const
inlineoverridevirtual

Reimplemented from FirmwarePlugin.

Definition at line 64 of file PX4FirmwarePlugin.h.

◆ autopilotPlugin()

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

Reimplemented from FirmwarePlugin.

Definition at line 93 of file PX4FirmwarePlugin.cc.

◆ brandImageIndoor()

QString PX4FirmwarePlugin::brandImageIndoor ( const Vehicle ) const
inlineoverridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 62 of file PX4FirmwarePlugin.h.

◆ brandImageOutdoor()

QString PX4FirmwarePlugin::brandImageOutdoor ( const Vehicle ) const
inlineoverridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 63 of file PX4FirmwarePlugin.h.

◆ expandedToolbarIndicatorSource()

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

Reimplemented from FirmwarePlugin.

Definition at line 817 of file PX4FirmwarePlugin.cc.

◆ fixedWingAirSpeedLimitsAvailable()

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

Reimplemented from FirmwarePlugin.

Definition at line 384 of file PX4FirmwarePlugin.cc.

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

◆ flightMode()

QString PX4FirmwarePlugin::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 118 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and flightMode().

Referenced by flightMode(), and setFlightMode().

◆ flightModes()

QStringList PX4FirmwarePlugin::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 98 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_flightModeList, Vehicle::fixedWing(), and Vehicle::multiRotor().

◆ followFlightMode()

QString PX4FirmwarePlugin::followFlightMode ( void  ) const
overridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 623 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::AUTO_FOLLOW_TARGET.

◆ getHobbsMeter()

QString PX4FirmwarePlugin::getHobbsMeter ( Vehicle vehicle) const
overridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 726 of file PX4FirmwarePlugin.cc.

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

◆ gotoFlightMode()

QString PX4FirmwarePlugin::gotoFlightMode ( void  ) const
overridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 618 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::AUTO_LOITER.

Referenced by setGuidedMode().

◆ guidedModeChangeAltitude()

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

◆ guidedModeChangeEquivalentAirspeedMetersSecond()

void PX4FirmwarePlugin::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 525 of file PX4FirmwarePlugin.cc.

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

◆ guidedModeChangeGroundSpeedMetersSecond()

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

Command vehicle to change groundspeed

Parameters
groundspeedGroundspeed in m/s

Reimplemented from FirmwarePlugin.

Definition at line 511 of file PX4FirmwarePlugin.cc.

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

◆ guidedModeChangeHeading()

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

Command vehicle to rotate towards specified location.

Reimplemented from FirmwarePlugin.

Definition at line 539 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::ChangeHeadingCapability, Vehicle::coordinate(), Vehicle::defaultComponentId(), isCapable(), qgcApp, and Vehicle::sendMavCommand().

◆ guidedModeGotoLocation()

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

Command vehicle to move to specified location (altitude is included and relative)

Reimplemented from FirmwarePlugin.

Definition at line 390 of file PX4FirmwarePlugin.cc.

References Vehicle::capabilityBits(), Vehicle::defaultComponentId(), qgcApp, Vehicle::sendMavCommand(), and Vehicle::sendMavCommandInt().

◆ guidedModeLand()

void PX4FirmwarePlugin::guidedModeLand ( Vehicle vehicle) const
overridevirtual

Command vehicle to land at current location.

Reimplemented from FirmwarePlugin.

Definition at line 299 of file PX4FirmwarePlugin.cc.

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

◆ guidedModeRTL()

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

Command vehicle to return to launch.

Reimplemented from FirmwarePlugin.

Definition at line 293 of file PX4FirmwarePlugin.cc.

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

◆ guidedModeTakeoff()

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

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

Reimplemented from FirmwarePlugin.

Definition at line 325 of file PX4FirmwarePlugin.cc.

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

◆ hasGripper()

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

Reimplemented from FirmwarePlugin.

Definition at line 748 of file PX4FirmwarePlugin.cc.

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

◆ highLatencyCustomModeTo32Bits()

uint32_t PX4FirmwarePlugin::highLatencyCustomModeTo32Bits ( uint16_t  hlCustomMode) const
overridevirtual

Convert from HIGH_LATENCY2.custom_mode value to correct 32 bit value.

Reimplemented from FirmwarePlugin.

Definition at line 701 of file PX4FirmwarePlugin.cc.

References px4_custom_mode::custom_mode_hl, and px4_custom_mode::data.

◆ initializeVehicle()

void PX4FirmwarePlugin::initializeVehicle ( Vehicle )
overridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 168 of file PX4FirmwarePlugin.cc.

References Vehicle::setFirmwarePluginInstanceData().

◆ isCapable()

◆ isGuidedMode()

bool PX4FirmwarePlugin::isGuidedMode ( const Vehicle ) const
overridevirtual

Returns whether the vehicle is in guided mode or not.

Reimplemented from FirmwarePlugin.

Definition at line 638 of file PX4FirmwarePlugin.cc.

References Vehicle::flightMode(), landFlightMode(), pauseFlightMode(), and takeOffFlightMode().

◆ landFlightMode()

QString PX4FirmwarePlugin::landFlightMode ( void  ) const
overridevirtual

Returns the flight mode for Land.

Reimplemented from FirmwarePlugin.

Definition at line 608 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::AUTO_LAND.

Referenced by guidedModeLand(), and isGuidedMode().

◆ maximumEquivalentAirspeed()

double PX4FirmwarePlugin::maximumEquivalentAirspeed ( Vehicle ) const
overridevirtual

◆ maximumHorizontalSpeedMultirotor()

double PX4FirmwarePlugin::maximumHorizontalSpeedMultirotor ( Vehicle ) const
overridevirtual

◆ minimumEquivalentAirspeed()

double PX4FirmwarePlugin::minimumEquivalentAirspeed ( Vehicle ) const
overridevirtual

◆ missionCommandOverrides()

QString PX4FirmwarePlugin::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 249 of file PX4FirmwarePlugin.cc.

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

◆ missionFlightMode()

QString PX4FirmwarePlugin::missionFlightMode ( void  ) const
overridevirtual

Returns the flight mode for running missions.

Reimplemented from FirmwarePlugin.

Definition at line 598 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::AUTO_MISSION.

Referenced by startMission().

◆ mulirotorSpeedLimitsAvailable()

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

Reimplemented from FirmwarePlugin.

Definition at line 379 of file PX4FirmwarePlugin.cc.

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

◆ offlineEditingParamFile()

QString PX4FirmwarePlugin::offlineEditingParamFile ( Vehicle ) const
inlineoverridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 61 of file PX4FirmwarePlugin.h.

◆ pauseFlightMode()

QString PX4FirmwarePlugin::pauseFlightMode ( void  ) const
overridevirtual

Returns The flight mode which indicates the vehicle is paused.

Reimplemented from FirmwarePlugin.

Definition at line 593 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::AUTO_LOITER.

Referenced by isGuidedMode().

◆ pauseVehicle()

void PX4FirmwarePlugin::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 279 of file PX4FirmwarePlugin.cc.

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

Referenced by guidedModeChangeAltitude(), and setGuidedMode().

◆ rtlFlightMode()

QString PX4FirmwarePlugin::rtlFlightMode ( void  ) const
overridevirtual

Returns the flight mode for RTL.

Reimplemented from FirmwarePlugin.

Definition at line 603 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::AUTO_RTL.

Referenced by guidedModeRTL().

◆ sendHomePositionToVehicle()

bool PX4FirmwarePlugin::sendHomePositionToVehicle ( void  ) const
overridevirtual

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 173 of file PX4FirmwarePlugin.cc.

◆ setFlightMode()

bool PX4FirmwarePlugin::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 129 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_flightModeList, and flightMode().

◆ setGuidedMode()

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

Set guided flight mode.

Reimplemented from FirmwarePlugin.

Definition at line 584 of file PX4FirmwarePlugin.cc.

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

◆ stabilizedFlightMode()

QString PX4FirmwarePlugin::stabilizedFlightMode ( void  ) const
overridevirtual

Returns the flight mode for Stabilized.

Reimplemented from FirmwarePlugin.

Definition at line 633 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::STABILIZED.

◆ startMission()

void PX4FirmwarePlugin::startMission ( Vehicle vehicle) const
overridevirtual

Command the vehicle to start the mission.

Reimplemented from FirmwarePlugin.

Definition at line 572 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_armVehicleAndValidate(), FirmwarePlugin::_setFlightModeAndValidate(), missionFlightMode(), and qgcApp.

◆ startTakeoff()

void PX4FirmwarePlugin::startTakeoff ( Vehicle vehicle) const
overridevirtual

Command the vehicle to start a takeoff.

Reimplemented from FirmwarePlugin.

Definition at line 560 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_armVehicleAndValidate(), FirmwarePlugin::_setFlightModeAndValidate(), qgcApp, and takeOffFlightMode().

◆ supportedMissionCommands()

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

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

Reimplemented from FirmwarePlugin.

Definition at line 198 of file PX4FirmwarePlugin.cc.

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

◆ supportsNegativeThrust()

bool PX4FirmwarePlugin::supportsNegativeThrust ( Vehicle ) const
overridevirtual

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

Reimplemented from FirmwarePlugin.

Definition at line 721 of file PX4FirmwarePlugin.cc.

References Vehicle::vehicleType().

◆ takeControlFlightMode()

QString PX4FirmwarePlugin::takeControlFlightMode ( void  ) const
overridevirtual

Returns the flight mode to use when the operator wants to take back control from autonomouse flight.

Reimplemented from FirmwarePlugin.

Definition at line 613 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::MANUAL.

◆ takeOffFlightMode()

QString PX4FirmwarePlugin::takeOffFlightMode ( void  ) const
overridevirtual

Returns the flight mode for TakeOff.

Reimplemented from FirmwarePlugin.

Definition at line 628 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_modeEnumToString, and PX4CustomMode::AUTO_TAKEOFF.

Referenced by isGuidedMode(), and startTakeoff().

◆ updateAvailableFlightModes()


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