|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <FirmwarePlugin.h>
Inheritance diagram for FirmwarePlugin:
Collaboration diagram for FirmwarePlugin:Public Types | |
| 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_t > | remapParamNameMinorVersionRemapMap_t |
| typedef QMap< int, remapParamNameMinorVersionRemapMap_t > | remapParamNameMajorVersionMap_t |
Signals | |
| void | toolIndicatorsChanged () |
Public Member Functions | |
| FirmwarePlugin (QObject *parent=nullptr) | |
| virtual | ~FirmwarePlugin () |
| virtual AutoPilotPlugin * | autopilotPlugin (Vehicle *vehicle) const |
| virtual void | initializeVehicle (Vehicle *) |
| Called when Vehicle is first created to perform any firmware specific setup. | |
| virtual bool | isCapable (const Vehicle *, FirmwareCapabilities) const |
| virtual QStringList | flightModes (Vehicle *) const |
| virtual QString | flightMode (uint8_t base_mode, uint32_t custom_mode) const |
| virtual bool | setFlightMode (const QString &flightMode, uint8_t *base_mode, uint32_t *custom_mode) const |
| virtual bool | MAV_CMD_DO_SET_MODE_is_supported () const |
| returns true if this flight stack supports MAV_CMD_DO_SET_MODE | |
| virtual QString | pauseFlightMode () const |
| Returns The flight mode which indicates the vehicle is paused. | |
| virtual QString | missionFlightMode () const |
| Returns the flight mode for running missions. | |
| virtual QString | rtlFlightMode () const |
| Returns the flight mode for RTL. | |
| virtual QString | smartRTLFlightMode () const |
| Returns the flight mode for Smart RTL. | |
| 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 bool | isGuidedMode (const Vehicle *) const |
| Returns whether the vehicle is in guided mode or not. | |
| virtual QString | gotoFlightMode () const |
| Returns the flight mode which the vehicle will be in if it is performing a goto location. | |
| virtual QString | followFlightMode () const |
| Returns the flight mode which the vehicle will be for follow me. | |
| virtual void | setGuidedMode (Vehicle *vehicle, bool guidedMode) const |
| Set guided flight mode. | |
| virtual void | pauseVehicle (Vehicle *vehicle) const |
| virtual void | guidedModeRTL (Vehicle *vehicle, bool smartRTL) const |
| Command vehicle to return to launch. | |
| virtual void | guidedModeLand (Vehicle *vehicle) const |
| Command vehicle to land at current location. | |
| virtual void | guidedModeTakeoff (Vehicle *vehicle, double takeoffAltRel) const |
| Command vehicle to takeoff from current location to the specified height. | |
| virtual void | guidedModeChangeHeading (Vehicle *vehicle, const QGeoCoordinate &headingCoord) const |
| Command vehicle to rotate towards specified location. | |
| virtual double | minimumTakeoffAltitudeMeters (Vehicle *) const |
| virtual double | maximumHorizontalSpeedMultirotor (Vehicle *) const |
| virtual double | maximumEquivalentAirspeed (Vehicle *) const |
| virtual double | minimumEquivalentAirspeed (Vehicle *) const |
| virtual bool | hasGripper (const Vehicle *) const |
| virtual bool | mulirotorSpeedLimitsAvailable (Vehicle *) const |
| virtual bool | fixedWingAirSpeedLimitsAvailable (Vehicle *) const |
| virtual void | startTakeoff (Vehicle *vehicle) const |
| Command the vehicle to start a takeoff. | |
| virtual void | startMission (Vehicle *vehicle) const |
| Command the vehicle to start the mission. | |
| virtual void | guidedModeGotoLocation (Vehicle *vehicle, const QGeoCoordinate &gotoCoord, double forwardFlightLoiterRadius=0.0) const |
| Command vehicle to move to specified location (altitude is included and relative) | |
| virtual void | guidedModeChangeAltitude (Vehicle *vehicle, double altitudeChange, bool pauseVehicle) |
| virtual void | guidedModeChangeGroundSpeedMetersSecond (Vehicle *vehicle, double groundspeed) const |
| virtual void | guidedModeChangeEquivalentAirspeedMetersSecond (Vehicle *vehicle, double airspeed_equiv) const |
| 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 bool | adjustIncomingMavlinkMessage (Vehicle *, mavlink_message_t *) |
| virtual void | adjustOutgoingMavlinkMessageThreadSafe (Vehicle *, LinkInterface *, mavlink_message_t *) |
| virtual bool | sendHomePositionToVehicle () const |
| virtual void | _getParameterMetaDataVersionInfo (const QString &metaDataFile, int &majorVersion, int &minorVersion) const |
| virtual QString | _internalParameterMetaDataFile (const Vehicle *) const |
| virtual QObject * | _loadParameterMetaData (const QString &) |
| virtual FactMetaData * | _getMetaDataForFact (QObject *, const QString &, FactMetaData::ValueType_t, MAV_TYPE) const |
| virtual QList< MAV_CMD > | supportedMissionCommands (QGCMAVLink::VehicleClass_t) const |
| List of supported mission commands. Empty list for all commands supported. | |
| virtual QString | missionCommandOverrides (QGCMAVLink::VehicleClass_t vehicleClass) const |
| virtual const remapParamNameMajorVersionMap_t & | paramNameRemapMajorVersionMap () 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 | brandImageIndoor (const Vehicle *) const |
| Return the resource file which contains the brand image for the vehicle for Indoor theme. | |
| virtual QString | brandImageOutdoor (const Vehicle *) const |
| Return the resource file which contains the brand image for the vehicle for Outdoor theme. | |
| 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 QVariant | expandedToolbarIndicatorSource (const Vehicle *, const QString &) const |
| virtual const QVariantList & | toolIndicators (const Vehicle *vehicle) |
| virtual QGCCameraManager * | createCameraManager (Vehicle *vehicle) const |
| Creates vehicle camera manager. | |
| virtual MavlinkCameraControl * | createCameraControl (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 void | sendGCSMotionReport (Vehicle *vehicle, const FollowMe::GCSMotionReport &motionReport, uint8_t estimationCapabilities) const |
| Sends the appropriate mavlink message for follow me support. | |
| virtual QString | getHobbsMeter (Vehicle *vehicle) const |
| gets hobbs meter from autopilot. This should be reimplmeented for each firmware | |
| virtual Autotune * | createAutotune (Vehicle *vehicle) const |
| Creates Autotune object. | |
| virtual void | updateAvailableFlightModes (FlightModeList &flightModeList) |
| Update Available flight modes recieved from vehicle. | |
Protected Member Functions | |
| bool | _armVehicleAndValidate (Vehicle *vehicle) const |
| bool | _setFlightModeAndValidate (Vehicle *vehicle, const QString &flightMode) const |
| virtual QString | _getLatestVersionFileUrl (Vehicle *) const |
| returns url with latest firmware release information. | |
| virtual void | _versionFileDownloadFinished (const QString &remoteFile, const QString &localFile, const Vehicle *vehicle) const |
| Callback to process file with latest release information. | |
| virtual QString | _versionRegex () const |
| Returns regex QString to extract version information from text. | |
| void | _setModeEnumToModeStringMapping (FlightModeCustomModeMap enumToString) |
| virtual uint32_t | _convertToCustomFlightModeEnum (uint32_t val) const |
| void | _updateFlightModeList (FlightModeList &flightModeList) |
| void | _addNewFlightMode (FirmwareFlightMode &flightMode) |
Protected Attributes | |
| FlightModeList | _flightModeList |
| FlightModeCustomModeMap | _modeEnumToString |
| QVariantList | _toolIndicatorList |
| QVariantList | _modeIndicatorList |
The FirmwarePlugin class represents the methods and objects which are specific to a certain Firmware flight stack. This is the only place where flight stack specific code should reside in QGroundControl. The remainder of the QGroundControl source is generic to a common mavlink implementation. The implementation in the base class supports mavlink generic firmware. Override the base clase virtuals to create your own firmware specific plugin.
Definition at line 65 of file FirmwarePlugin.h.
| typedef QMap<int, remapParamNameMinorVersionRemapMap_t> FirmwarePlugin::remapParamNameMajorVersionMap_t |
Maps from firmware major version number to remapParamNameMinorVersionRemapMap_t entry key: firmware major version value: remapParamNameMinorVersionRemapMap_t entry
Definition at line 98 of file FirmwarePlugin.h.
| typedef QMap<QString, QString> FirmwarePlugin::remapParamNameMap_t |
Maps from on parameter name to another key: parameter name to translate from value: mapped parameter name
Definition at line 88 of file FirmwarePlugin.h.
| typedef QMap<int, remapParamNameMap_t> FirmwarePlugin::remapParamNameMinorVersionRemapMap_t |
Maps from firmware minor version to remapParamNameMap_t entry key: firmware minor version value: remapParamNameMap_t entry
Definition at line 93 of file FirmwarePlugin.h.
Set of optional capabilites which firmware may support.
| Enumerator | |
|---|---|
| SetFlightModeCapability | FirmwarePlugin::setFlightMode method is supported. |
| PauseVehicleCapability | Vehicle supports pausing at current location. |
| GuidedModeCapability | Vehicle supports guided mode commands. |
| OrbitModeCapability | Vehicle supports orbit mode. |
| TakeoffVehicleCapability | Vehicle supports taking off. |
| ROIModeCapability | Vehicle supports ROI (both in Fly guided mode and from Plan creation) |
| ChangeHeadingCapability | Vehicle supports changing heading at current location. |
| GuidedTakeoffCapability | Vehicle supports guided takeoff. |
Definition at line 74 of file FirmwarePlugin.h.
|
explicit |
Definition at line 20 of file FirmwarePlugin.cc.
|
virtual |
Definition at line 26 of file FirmwarePlugin.cc.
|
protected |
Definition at line 447 of file FirmwarePlugin.cc.
References _flightModeList, FirmwareFlightMode::custom_mode, and FirmwareFlightMode::mode_name.
Referenced by _updateFlightModeList().
|
protected |
Arms the vehicle with validation and retries
Definition at line 217 of file FirmwarePlugin.cc.
References Vehicle::armed(), and Vehicle::setArmed().
Referenced by APMFirmwarePlugin::startMission(), PX4FirmwarePlugin::startMission(), APMFirmwarePlugin::startTakeoff(), and PX4FirmwarePlugin::startTakeoff().
|
inlineprotectedvirtual |
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, ArduRoverFirmwarePlugin, and ArduSubFirmwarePlugin.
Definition at line 419 of file FirmwarePlugin.h.
Referenced by APMFirmwarePlugin::guidedFlightMode(), APMFirmwarePlugin::missionFlightMode(), APMFirmwarePlugin::rtlFlightMode(), and APMFirmwarePlugin::smartRTLFlightMode().
|
inlineprotectedvirtual |
returns url with latest firmware release information.
Definition at line 407 of file FirmwarePlugin.h.
Referenced by checkIfIsLatestStable().
|
inlinevirtual |
Returns the FactMetaData associated with the parameter name
| opaqueParameterMetaData | Opaque pointer returned from loadParameterMetaData Important: Only CompInfoParam code should use this method |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 298 of file FirmwarePlugin.h.
Referenced by CompInfoParam::factMetaDataForName().
|
virtual |
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 in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 104 of file FirmwarePlugin.cc.
Referenced by CompInfoParam::_cachePX4MetaDataFile().
|
inlinevirtual |
Returns the internal resource parameter meta date file. Important: Only CompInfoParam code should use this method
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 287 of file FirmwarePlugin.h.
|
inlinevirtual |
Loads the specified parameter meta data file.
Reimplemented in PX4FirmwarePlugin, and APMFirmwarePlugin.
Definition at line 293 of file FirmwarePlugin.h.
|
protected |
Sets the vehicle to the specified flight mode with validation and retries
Definition at line 241 of file FirmwarePlugin.cc.
References Vehicle::flightMode(), flightMode(), and Vehicle::setFlightMode().
Referenced by APMFirmwarePlugin::guidedModeChangeAltitude(), ArduCopterFirmwarePlugin::guidedModeLand(), PX4FirmwarePlugin::guidedModeLand(), APMFirmwarePlugin::guidedModeRTL(), PX4FirmwarePlugin::guidedModeRTL(), APMFirmwarePlugin::pauseVehicle(), APMFirmwarePlugin::setGuidedMode(), PX4FirmwarePlugin::setGuidedMode(), APMFirmwarePlugin::startMission(), PX4FirmwarePlugin::startMission(), APMFirmwarePlugin::startTakeoff(), and PX4FirmwarePlugin::startTakeoff().
|
inlineprotected |
Definition at line 416 of file FirmwarePlugin.h.
References _modeEnumToString.
Referenced by ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(), ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(), ArduRoverFirmwarePlugin::ArduRoverFirmwarePlugin(), ArduSubFirmwarePlugin::ArduSubFirmwarePlugin(), and PX4FirmwarePlugin::PX4FirmwarePlugin().
|
protected |
Definition at line 432 of file FirmwarePlugin.cc.
References _addNewFlightMode(), _flightModeList, _modeEnumToString, and flightMode().
Referenced by updateAvailableFlightModes(), ArduCopterFirmwarePlugin::updateAvailableFlightModes(), ArduPlaneFirmwarePlugin::updateAvailableFlightModes(), ArduRoverFirmwarePlugin::updateAvailableFlightModes(), ArduSubFirmwarePlugin::updateAvailableFlightModes(), and PX4FirmwarePlugin::updateAvailableFlightModes().
|
protectedvirtual |
Callback to process file with latest release information.
Definition at line 324 of file FirmwarePlugin.cc.
References _versionRegex(), Vehicle::firmwareMajorVersion(), Vehicle::firmwareMinorVersion(), Vehicle::firmwarePatchVersion(), Vehicle::firmwareVersionType(), qgcApp, and Vehicle::versionCompare().
Referenced by checkIfIsLatestStable().
|
inlineprotectedvirtual |
Returns regex QString to extract version information from text.
Definition at line 413 of file FirmwarePlugin.h.
Referenced by _versionFileDownloadFinished().
|
inlinevirtual |
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.
| vehicle | Vehicle message came from |
| message[in,out] | Mavlink message to adjust if needed. |
Reimplemented in APMFirmwarePlugin, ArduSubFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 257 of file FirmwarePlugin.h.
|
inlinevirtual |
Allows the Firmware plugin to override the facts meta data.
| vehicleType | - Type of current vehicle |
| metaData | - MetaData for fact |
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 380 of file FirmwarePlugin.h.
Referenced by Vehicle::Vehicle().
|
inlinevirtual |
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 in APMFirmwarePlugin.
Definition at line 268 of file FirmwarePlugin.h.
Referenced by Vehicle::sendMessageOnLinkThreadSafe().
|
inlinevirtual |
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 357 of file FirmwarePlugin.h.
Referenced by Vehicle::autoDisarm().
|
virtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 31 of file FirmwarePlugin.cc.
Referenced by Vehicle::Vehicle().
|
virtual |
Returns the data needed to do battery consumption calculations
| [out] | mAhBattery | Battery milliamp-hours rating (0 for no battery data available) |
| [out] | hoverAmps | Current draw in amps during hover |
| [out] | cruiseAmps | Current draw in amps during cruise |
Definition at line 272 of file FirmwarePlugin.cc.
|
inlinevirtual |
Return the resource file which contains the brand image for the vehicle for Indoor theme.
Reimplemented in APMFirmwarePlugin, ArduSubFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 323 of file FirmwarePlugin.h.
Referenced by Vehicle::brandImageIndoor().
|
inlinevirtual |
Return the resource file which contains the brand image for the vehicle for Outdoor theme.
Reimplemented in APMFirmwarePlugin, ArduSubFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 326 of file FirmwarePlugin.h.
Referenced by Vehicle::brandImageOutdoor().
|
virtual |
Used to check if running firmware is latest stable version.
Definition at line 299 of file FirmwarePlugin.cc.
References _getLatestVersionFileUrl(), _versionFileDownloadFinished(), QGCFileDownload::finished(), qgcApp, and QGCFileDownload::start().
Creates Autotune object.
Definition at line 427 of file FirmwarePlugin.cc.
|
virtual |
Camera control.
Definition at line 294 of file FirmwarePlugin.cc.
|
virtual |
Creates vehicle camera manager.
Definition at line 289 of file FirmwarePlugin.cc.
|
inlinevirtual |
Default tx mode to apply to joystick axes TX modes are as outlined here: http://www.rc-airplane-world.com/rc-transmitter-modes.html
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 228 of file FirmwarePlugin.h.
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 334 of file FirmwarePlugin.h.
Referenced by Vehicle::expandedToolbarIndicatorSource().
|
inlinevirtual |
Returns a pointer to a dictionary of firmware-specific FactGroups.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 348 of file FirmwarePlugin.h.
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 202 of file FirmwarePlugin.h.
|
virtual |
Returns the name for this flight mode. Flight mode names must be human readable as well as audio speakable.
| base_mode | Base mode from mavlink HEARTBEAT message |
| custom_mode | Custom mode from mavlink HEARTBEAT message |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 36 of file FirmwarePlugin.cc.
References _modeEnumToString, and flightMode().
Referenced by _setFlightModeAndValidate(), _updateFlightModeList(), Vehicle::flightMode(), flightMode(), and setFlightMode().
|
inlinevirtual |
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 in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 111 of file FirmwarePlugin.h.
Referenced by Vehicle::flightModes().
|
inlinevirtual |
Returns the flight mode which the vehicle will be for follow me.
Reimplemented in ArduCopterFirmwarePlugin, ArduRoverFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 162 of file FirmwarePlugin.h.
Referenced by Vehicle::followFlightMode().
|
inlinevirtual |
gets hobbs meter from autopilot. This should be reimplmeented for each firmware
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 386 of file FirmwarePlugin.h.
Referenced by Vehicle::hobbsMeter().
|
inlinevirtual |
Returns the flight mode which the vehicle will be in if it is performing a goto location.
Reimplemented in APMFirmwarePlugin, ArduCopterFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 159 of file FirmwarePlugin.h.
Referenced by Vehicle::gotoFlightMode().
|
virtual |
Command vehicle to change altitude
| altitudeChange | If > 0, go up by amount specified, if < 0, go down by amount specified |
| pauseVehicle | true: pause vehicle prior to altitude change |
Reimplemented in APMFirmwarePlugin, ArduRoverFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 152 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, pauseVehicle(), and qgcApp.
Referenced by Vehicle::guidedModeChangeAltitude().
|
virtual |
Command vehicle to change equivalent airspeed
| airspeed_equiv | Equivalent airspeed in m/s |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 163 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::guidedModeChangeEquivalentAirspeedMetersSecond().
|
virtual |
Command vehicle to change groundspeed
| groundspeed | Groundspeed in m/s |
Reimplemented in PX4FirmwarePlugin, and APMFirmwarePlugin.
Definition at line 158 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::guidedModeChangeGroundSpeedMetersSecond().
|
virtual |
Command vehicle to rotate towards specified location.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 168 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::guidedModeChangeHeading().
|
virtual |
Command vehicle to move to specified location (altitude is included and relative)
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 144 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::guidedModeGotoLocation().
|
virtual |
Command vehicle to land at current location.
Reimplemented in ArduCopterFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 131 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::guidedModeLand().
|
virtual |
Command vehicle to return to launch.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 124 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::guidedModeRTL().
|
virtual |
Command vehicle to takeoff from current location to the specified height.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 137 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::guidedModeTakeoff().
|
virtual |
Used to determine whether a vehicle has a gimbal.
| [out] | rollSupported | Gimbal supports roll |
| [out] | pitchSupported | Gimbal supports pitch |
| [out] | yawSupported | Gimbal supports yaw |
Definition at line 280 of file FirmwarePlugin.cc.
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 196 of file FirmwarePlugin.h.
Referenced by Vehicle::hasGripper().
|
inlinevirtual |
Convert from HIGH_LATENCY2.custom_mode value to correct 32 bit value.
Reimplemented in PX4FirmwarePlugin.
Definition at line 367 of file FirmwarePlugin.h.
|
inlinevirtual |
Called when Vehicle is first created to perform any firmware specific setup.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 104 of file FirmwarePlugin.h.
Referenced by Vehicle::Vehicle(), and Vehicle::Vehicle().
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, ArduSubFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 107 of file FirmwarePlugin.h.
Referenced by VehicleSupports::changeHeading(), Vehicle::flightModeSetAvailable(), VehicleSupports::guidedMode(), VehicleSupports::guidedTakeoffWithAltitude(), VehicleSupports::guidedTakeoffWithoutAltitude(), VehicleSupports::orbitMode(), VehicleSupports::pauseVehicle(), VehicleSupports::roiMode(), and VehicleSupports::takeoffMissionCommand().
|
inlinevirtual |
Returns whether the vehicle is in guided mode or not.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 156 of file FirmwarePlugin.h.
Referenced by Vehicle::guidedMode().
|
inlinevirtual |
Returns the flight mode for Land.
Reimplemented in ArduCopterFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 141 of file FirmwarePlugin.h.
Referenced by Vehicle::landFlightMode().
|
inlinevirtual |
returns true if this flight stack supports MAV_CMD_DO_SET_MODE
Reimplemented in APMFirmwarePlugin.
Definition at line 124 of file FirmwarePlugin.h.
Referenced by Vehicle::setFlightMode().
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 190 of file FirmwarePlugin.h.
Referenced by Vehicle::maximumEquivalentAirspeed(), APMFirmwarePlugin::maximumEquivalentAirspeed(), and PX4FirmwarePlugin::maximumEquivalentAirspeed().
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 187 of file FirmwarePlugin.h.
Referenced by Vehicle::maximumHorizontalSpeedMultirotor(), APMFirmwarePlugin::maximumHorizontalSpeedMultirotor(), and PX4FirmwarePlugin::maximumHorizontalSpeedMultirotor().
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 193 of file FirmwarePlugin.h.
Referenced by Vehicle::minimumEquivalentAirspeed(), APMFirmwarePlugin::minimumEquivalentAirspeed(), and PX4FirmwarePlugin::minimumEquivalentAirspeed().
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin.
Definition at line 184 of file FirmwarePlugin.h.
Referenced by Vehicle::minimumTakeoffAltitudeMeters(), and APMFirmwarePlugin::minimumTakeoffAltitudeMeters().
|
virtual |
Returns the name of the mission command json override file for the specified vehicle type.
| vehicleClass | Vehicle class to return file for, VehicleClassGeneric is a request for overrides for all vehicle types |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 83 of file FirmwarePlugin.cc.
References QGCMAVLink::VehicleClassFixedWing, QGCMAVLink::VehicleClassGeneric, QGCMAVLink::VehicleClassMultiRotor, QGCMAVLink::VehicleClassRoverBoat, QGCMAVLink::VehicleClassSub, and QGCMAVLink::VehicleClassVTOL.
Referenced by MissionCommandTree::MissionCommandTree().
|
inlinevirtual |
Returns the flight mode for running missions.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 130 of file FirmwarePlugin.h.
Referenced by Vehicle::missionFlightMode(), and Vehicle::setEventsMetadata().
|
inlinevirtual |
Returns the flight mode for Motor Detection.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 147 of file FirmwarePlugin.h.
Referenced by Vehicle::motorDetectionFlightMode().
|
inlinevirtual |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 199 of file FirmwarePlugin.h.
|
inlinevirtual |
Reimplemented in ArduCopterFirmwarePlugin.
Definition at line 314 of file FirmwarePlugin.h.
Referenced by Vehicle::coaxialMotors().
|
inlinevirtual |
Reimplemented in ArduCopterFirmwarePlugin.
Definition at line 317 of file FirmwarePlugin.h.
Referenced by Vehicle::xConfigMotors().
|
inlinevirtual |
Return the resource file which contains the set of params loaded for offline editing.
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, ArduRoverFirmwarePlugin, ArduSubFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 320 of file FirmwarePlugin.h.
Referenced by APMFirmwarePlugin::initializeVehicle().
|
virtual |
Returns the mapping structure which is used to map from one parameter name to another based on firmware version.
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, ArduRoverFirmwarePlugin, and ArduSubFirmwarePlugin.
Definition at line 185 of file FirmwarePlugin.cc.
|
inlinevirtual |
Returns The flight mode which indicates the vehicle is paused.
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, ArduRoverFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 127 of file FirmwarePlugin.h.
Referenced by APMFirmwarePlugin::guidedModeChangeAltitude(), Vehicle::pauseFlightMode(), and APMFirmwarePlugin::pauseVehicle().
|
virtual |
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 in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 118 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by guidedModeChangeAltitude(), and Vehicle::pauseVehicle().
|
inlinevirtual |
Returns the highest major version number that is known to the remap for this specified major version.
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, ArduRoverFirmwarePlugin, and ArduSubFirmwarePlugin.
Definition at line 311 of file FirmwarePlugin.h.
|
inlinevirtual |
Returns the flight mode for RTL.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 133 of file FirmwarePlugin.h.
Referenced by Vehicle::rtlFlightMode().
|
virtual |
Sends the appropriate mavlink message for follow me support.
Reimplemented in APMFirmwarePlugin.
Definition at line 396 of file FirmwarePlugin.cc.
References FollowMe::GCSMotionReport::altMetersAMSL, MAVLinkProtocol::getComponentId(), MAVLinkProtocol::instance(), FollowMe::GCSMotionReport::lat_int, FollowMe::GCSMotionReport::lon_int, FollowMe::GCSMotionReport::pos_std_dev, VehicleLinkManager::primaryLink(), qgcApp, Vehicle::sendMessageOnLinkThreadSafe(), Vehicle::vehicleLinkManager(), FollowMe::GCSMotionReport::vxMetersPerSec, and FollowMe::GCSMotionReport::vyMetersPerSec.
|
inlinevirtual |
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.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 278 of file FirmwarePlugin.h.
Referenced by PlanManager::_handleMissionItem(), MissionController::currentMissionIndex(), MissionManager::generateResumeMission(), MissionController::resumeMission(), MissionController::resumeMissionIndex(), Vehicle::setCurrentMissionSequence(), and PlanManager::writeMissionItems().
|
virtual |
Sets base_mode and custom_mode to specified flight mode.
| [out] | base_mode | Base mode for SET_MODE mavlink message |
| [out] | custom_mode | Custom mode for SET_MODE mavlink message |
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 72 of file FirmwarePlugin.cc.
References flightMode().
|
virtual |
Set guided flight mode.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 111 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::setGuidedMode().
|
inlinevirtual |
Returns the flight mode for Smart RTL.
Reimplemented in APMFirmwarePlugin.
Definition at line 136 of file FirmwarePlugin.h.
Referenced by Vehicle::smartRTLFlightMode().
|
inlinevirtual |
Returns the flight mode for Stabilized.
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, ArduRoverFirmwarePlugin, ArduSubFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 150 of file FirmwarePlugin.h.
Referenced by Vehicle::stabilizedFlightMode().
|
virtual |
Command the vehicle to start the mission.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 180 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::startMission().
|
virtual |
Command the vehicle to start a takeoff.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 174 of file FirmwarePlugin.cc.
References guided_mode_not_supported_by_vehicle, and qgcApp.
Referenced by Vehicle::startTakeoff().
|
inlinevirtual |
List of supported mission commands. Empty list for all commands supported.
Reimplemented in APMFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 301 of file FirmwarePlugin.h.
Referenced by CameraSection::cameraModeSupported(), MissionCommandTree::getCommandsForCategory(), MissionController::insertCancelROIMissionItem(), and MissionController::insertROIMissionItem().
|
inlinevirtual |
Returns true if the firmware supports the AP_JSButton library, which allows joystick buttons to be assigned via parameters in firmware. Default is false.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 245 of file FirmwarePlugin.h.
Referenced by VehicleSupports::jsButton().
|
inlinevirtual |
Returns true if the firmware supports calibrating motor interference offsets for the compass (CompassMot). Default is true.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 249 of file FirmwarePlugin.h.
Referenced by VehicleSupports::motorInterference().
|
inlinevirtual |
Returns true if the vehicle and firmware supports the use of negative thrust Typically supported rover.
Reimplemented in ArduRoverFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 237 of file FirmwarePlugin.h.
Referenced by VehicleSupports::negativeThrust().
|
inlinevirtual |
Returns true if the firmware supports the use of the RC radio and requires the RC radio setup page. Returns true by default.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 241 of file FirmwarePlugin.h.
Referenced by VehicleSupports::radio().
|
inlinevirtual |
Reimplemented in ArduCopterFirmwarePlugin, and ArduRoverFirmwarePlugin.
Definition at line 138 of file FirmwarePlugin.h.
Referenced by VehicleSupports::smartRTL().
|
inlinevirtual |
Returns true if the vehicle and firmware supports the use of a throttle joystick that is zero when centered. Typically not supported on vehicles that have bidirectional throttle.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 233 of file FirmwarePlugin.h.
|
inlinevirtual |
Returns the flight mode to use when the operator wants to take back control from autonomouse flight.
Reimplemented in ArduCopterFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 153 of file FirmwarePlugin.h.
Referenced by Vehicle::takeControlFlightMode().
|
inlinevirtual |
Returns the flight mode for TakeOff.
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 144 of file FirmwarePlugin.h.
Referenced by Vehicle::setEventsMetadata(), and APMFirmwarePlugin::startTakeoff().
|
virtual |
Returns the list of toolbar tool indicators associated with a vehicle signals toolIndicatorsChanged
Reimplemented in APMFirmwarePlugin.
Definition at line 192 of file FirmwarePlugin.cc.
References _toolIndicatorList.
Referenced by Vehicle::toolIndicators(), and APMFirmwarePlugin::toolIndicators().
|
signal |
|
inlinevirtual |
Update Available flight modes recieved from vehicle.
Reimplemented in ArduCopterFirmwarePlugin, ArduPlaneFirmwarePlugin, ArduRoverFirmwarePlugin, ArduSubFirmwarePlugin, and PX4FirmwarePlugin.
Definition at line 392 of file FirmwarePlugin.h.
References _updateFlightModeList().
Referenced by StandardModes::gotMessage().
|
inlinevirtual |
Return the resource file which contains the vehicle icon used in the flight view when the view is dark (Satellite for instance)
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 329 of file FirmwarePlugin.h.
Referenced by Vehicle::vehicleImageOpaque().
|
inlinevirtual |
Return the resource file which contains the vehicle icon used in the flight view when the view is light (Map for instance)
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 332 of file FirmwarePlugin.h.
Referenced by Vehicle::vehicleImageOutline().
| int FirmwarePlugin::versionCompare | ( | const Vehicle * | vehicle, |
| const QString & | compare | ||
| ) | const |
Used to check if running current version is equal or higher than the one being compared. returns 1 if current > compare, 0 if current == compare, -1 if current < compare
Definition at line 381 of file FirmwarePlugin.cc.
References versionCompare().
Referenced by Vehicle::versionCompare(), versionCompare(), and Vehicle::versionCompare().
| int FirmwarePlugin::versionCompare | ( | const Vehicle * | vehicle, |
| int | major, | ||
| int | minor, | ||
| int | patch | ||
| ) | const |
Definition at line 361 of file FirmwarePlugin.cc.
References Vehicle::firmwareMajorVersion(), Vehicle::firmwareMinorVersion(), and Vehicle::firmwarePatchVersion().
|
protected |
Definition at line 425 of file FirmwarePlugin.h.
Referenced by _addNewFlightMode(), _updateFlightModeList(), APMFirmwarePlugin::flightModes(), PX4FirmwarePlugin::flightModes(), APMFirmwarePlugin::setFlightMode(), and PX4FirmwarePlugin::setFlightMode().
|
protected |
Definition at line 426 of file FirmwarePlugin.h.
Referenced by _setModeEnumToModeStringMapping(), _updateFlightModeList(), flightMode(), APMFirmwarePlugin::flightMode(), PX4FirmwarePlugin::flightMode(), ArduCopterFirmwarePlugin::followFlightMode(), ArduRoverFirmwarePlugin::followFlightMode(), PX4FirmwarePlugin::followFlightMode(), PX4FirmwarePlugin::gotoFlightMode(), APMFirmwarePlugin::guidedFlightMode(), ArduCopterFirmwarePlugin::landFlightMode(), PX4FirmwarePlugin::landFlightMode(), APMFirmwarePlugin::missionFlightMode(), PX4FirmwarePlugin::missionFlightMode(), ArduSubFirmwarePlugin::motorDetectionFlightMode(), ArduCopterFirmwarePlugin::pauseFlightMode(), ArduPlaneFirmwarePlugin::pauseFlightMode(), ArduRoverFirmwarePlugin::pauseFlightMode(), PX4FirmwarePlugin::pauseFlightMode(), APMFirmwarePlugin::rtlFlightMode(), PX4FirmwarePlugin::rtlFlightMode(), APMFirmwarePlugin::smartRTLFlightMode(), ArduCopterFirmwarePlugin::stabilizedFlightMode(), ArduPlaneFirmwarePlugin::stabilizedFlightMode(), ArduRoverFirmwarePlugin::stabilizedFlightMode(), ArduSubFirmwarePlugin::stabilizedFlightMode(), PX4FirmwarePlugin::stabilizedFlightMode(), ArduCopterFirmwarePlugin::takeControlFlightMode(), PX4FirmwarePlugin::takeControlFlightMode(), ArduPlaneFirmwarePlugin::takeOffFlightMode(), and PX4FirmwarePlugin::takeOffFlightMode().
|
protected |
Definition at line 429 of file FirmwarePlugin.h.
|
protected |
Definition at line 428 of file FirmwarePlugin.h.
Referenced by toolIndicators().