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 maximumHorizontalSpeedMultirotorMetersSecond (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
 
bool guidedModeGotoLocation (Vehicle *vehicle, const QGeoCoordinate &gotoCoord, double forwardFlightLoiterRadius) const override
 
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
 
QString _internalParameterMetaDataFile (const Vehicle *vehicle) const override
 
MAV_AUTOPILOT _autopilotType () const override
 
ParameterMetaData_createParameterMetaData () 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 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
 
virtual int remapParamNameHigestMinorVersionNumber (int) 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 const QVariantList & toolIndicators (const Vehicle *vehicle)
 
virtual QGCCameraManagercreateCameraManager (Vehicle *vehicle) const
 Creates vehicle camera manager.
 
virtual MavlinkCameraControlInterfacecreateCameraControl (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.
 
ParameterMetaDataloadParameterMetaData (const Vehicle *vehicle)
 
void cacheParameterMetaDataFile (const QString &metaDataFile)
 

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
 
QString _cachedParameterMetaDataFile (const Vehicle *vehicle) 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 90 of file PX4FirmwarePlugin.cc.

Member Function Documentation

◆ _autopilotType()

MAV_AUTOPILOT PX4FirmwarePlugin::_autopilotType ( ) const
inlineoverridevirtual

Reimplemented from FirmwarePlugin.

Definition at line 57 of file PX4FirmwarePlugin.h.

◆ _changeAltAfterPause()

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

◆ _createParameterMetaData()

ParameterMetaData * PX4FirmwarePlugin::_createParameterMetaData ( )
finalvirtual

Reimplemented from FirmwarePlugin.

Definition at line 253 of file PX4FirmwarePlugin.cc.

◆ _internalParameterMetaDataFile()

QString PX4FirmwarePlugin::_internalParameterMetaDataFile ( const Vehicle vehicle) const
inlineoverridevirtual

Reimplemented from FirmwarePlugin.

Definition at line 56 of file PX4FirmwarePlugin.h.

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

◆ autoDisarmParameter()

QString PX4FirmwarePlugin::autoDisarmParameter ( Vehicle vehicle) const
inlineoverridevirtual

Reimplemented from FirmwarePlugin.

Definition at line 61 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 94 of file PX4FirmwarePlugin.cc.

◆ expandedToolbarIndicatorSource()

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

Reimplemented from FirmwarePlugin.

Definition at line 798 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 363 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 119 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 99 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 604 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 707 of file PX4FirmwarePlugin.cc.

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

◆ 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 599 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 506 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 492 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 520 of file PX4FirmwarePlugin.cc.

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

◆ guidedModeGotoLocation()

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

Command vehicle to move to specified location (altitude is ignored, vehicle uses current altitude)

Returns
true: goto command accepted, false: goto failed (vehicle not moved)

Reimplemented from FirmwarePlugin.

Definition at line 369 of file PX4FirmwarePlugin.cc.

References VehicleFactGroup::altitudeAMSL(), Vehicle::capabilityBits(), Vehicle::defaultComponentId(), Fact::rawValue(), Vehicle::sendMavCommand(), Vehicle::sendMavCommandInt(), and QGC::showAppMessage().

◆ guidedModeLand()

void PX4FirmwarePlugin::guidedModeLand ( Vehicle vehicle) const
overridevirtual

Command vehicle to land at current location.

Reimplemented from FirmwarePlugin.

Definition at line 278 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 272 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 304 of file PX4FirmwarePlugin.cc.

References VehicleFactGroup::altitudeAMSL(), Vehicle::defaultComponentId(), Vehicle::mavCommandResult(), Fact::rawValue(), Vehicle::sendMavCommand(), and QGC::showAppMessage().

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

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

◆ 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 682 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 169 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 619 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 589 of file PX4FirmwarePlugin.cc.

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

Referenced by guidedModeLand(), and isGuidedMode().

◆ maximumEquivalentAirspeed()

double PX4FirmwarePlugin::maximumEquivalentAirspeed ( Vehicle ) const
overridevirtual

◆ maximumHorizontalSpeedMultirotorMetersSecond()

double PX4FirmwarePlugin::maximumHorizontalSpeedMultirotorMetersSecond ( 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 232 of file PX4FirmwarePlugin.cc.

References QGCMAVLink::VehicleClassFixedWing, QGCMAVLinkTypes::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 579 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 358 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 60 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 574 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 258 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 584 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 174 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 130 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 565 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 614 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 553 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_armVehicleAndValidate(), FirmwarePlugin::_setFlightModeAndValidate(), missionFlightMode(), and QGC::showAppMessage().

◆ startTakeoff()

void PX4FirmwarePlugin::startTakeoff ( Vehicle vehicle) const
overridevirtual

Command the vehicle to start a takeoff.

Reimplemented from FirmwarePlugin.

Definition at line 541 of file PX4FirmwarePlugin.cc.

References FirmwarePlugin::_armVehicleAndValidate(), FirmwarePlugin::_setFlightModeAndValidate(), QGC::showAppMessage(), 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 181 of file PX4FirmwarePlugin.cc.

References SettingsManager::instance(), QGCMAVLink::VehicleClassFixedWing, QGCMAVLinkTypes::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 702 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 594 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 609 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: