This is the base class for all stack specific APM firmware plugins. More...
#include <APMFirmwarePlugin.h>
Public Member Functions | |
| QList< MAV_CMD > | supportedMissionCommands (QGCMAVLink::VehicleClass_t vehicleClass) const override |
| List of supported mission commands. Empty list for all commands supported. | |
| AutoPilotPlugin * | autopilotPlugin (Vehicle *vehicle) const override |
| bool | isCapable (const Vehicle *vehicle, FirmwareCapabilities capabilities) const override |
| void | setGuidedMode (Vehicle *vehicle, bool guidedMode) const override |
| Set guided flight mode. | |
| void | guidedModeTakeoff (Vehicle *vehicle, double altitudeRel) const override |
| Command vehicle to takeoff from current location to the specified height. | |
| bool | guidedModeGotoLocation (Vehicle *vehicle, const QGeoCoordinate &gotoCoord, double forwardFlightLoiterRadius) const override |
| double | minimumTakeoffAltitudeMeters (Vehicle *vehicle) const override |
| void | startTakeoff (Vehicle *vehicle) const override |
| Command the vehicle to start a takeoff. | |
| void | startMission (Vehicle *vehicle) const override |
| Command the vehicle to start the mission. | |
| VehicleReadiness * | createVehicleReadiness (Vehicle *vehicle) 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 |
| bool | MAV_CMD_DO_SET_MODE_is_supported () const override |
| returns true if this flight stack supports MAV_CMD_DO_SET_MODE | |
| bool | isGuidedMode (const Vehicle *vehicle) const override |
| Returns whether the vehicle is in guided mode or not. | |
| QString | gotoFlightMode () const override |
| Returns the flight mode which the vehicle will be in if it is performing a goto location. | |
| QString | rtlFlightMode () const override |
| Returns the flight mode for RTL. | |
| QString | smartRTLFlightMode () const override |
| Returns the flight mode for Smart RTL. | |
| QString | missionFlightMode () const override |
| Returns the flight mode for running missions. | |
| virtual QString | guidedFlightMode () const |
| void | pauseVehicle (Vehicle *vehicle) const override |
| void | guidedModeRTL (Vehicle *vehicle, bool smartRTL) const override |
| Command vehicle to return to launch. | |
| void | guidedModeChangeAltitude (Vehicle *vehicle, double altitudeChange, bool pauseVehicle) override |
| void | guidedModeChangeHeading (Vehicle *vehicle, const QGeoCoordinate &headingCoord) const override |
| Command vehicle to rotate towards specified location. | |
| bool | adjustIncomingMavlinkMessage (Vehicle *vehicle, mavlink_message_t *message) override |
| void | adjustOutgoingMavlinkMessageThreadSafe (Vehicle *vehicle, LinkInterface *outgoingLink, mavlink_message_t *message) override |
| virtual void | initializeStreamRates (Vehicle *vehicle) |
| void | initializeVehicle (Vehicle *vehicle) override |
| Called when Vehicle is first created to perform any firmware specific setup. | |
| bool | sendHomePositionToVehicle () const override |
| QString | missionCommandOverrides (QGCMAVLink::VehicleClass_t vehicleClass) const override |
| QString | _internalParameterMetaDataFile (const Vehicle *vehicle) const override |
| MAV_AUTOPILOT | _autopilotType () const override |
| ParameterMetaData * | _createParameterMetaData () 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 |
| const QVariantList & | toolIndicators (const Vehicle *vehicle) override |
| double | maximumEquivalentAirspeed (Vehicle *vehicle) const override |
| double | minimumEquivalentAirspeed (Vehicle *vehicle) const override |
| bool | fixedWingAirSpeedLimitsAvailable (Vehicle *vehicle) const override |
| void | guidedModeChangeEquivalentAirspeedMetersSecond (Vehicle *vehicle, double airspeed_equiv) const override |
| void | sendGCSMotionReport (Vehicle *vehicle, const FollowMe::GCSMotionReport &motionReport, uint8_t estimatationCapabilities) const override |
| Sends the appropriate mavlink message for follow me support. | |
| QVariant | expandedToolbarIndicatorSource (const Vehicle *vehicle, const QString &indicatorName) const override |
| bool | mulirotorSpeedLimitsAvailable (Vehicle *vehicle) const override |
| double | maximumHorizontalSpeedMultirotorMetersSecond (Vehicle *vehicle) const override |
| void | guidedModeChangeGroundSpeedMetersSecond (Vehicle *vehicle, double speed) const override |
| Public Member Functions inherited from FirmwarePlugin | |
| FirmwarePlugin (QObject *parent=nullptr) | |
| virtual | ~FirmwarePlugin () |
| virtual QString | pauseFlightMode () const |
| Returns The flight mode which indicates the vehicle is paused. | |
| virtual bool | supportsSmartRTL () const |
| virtual QString | landFlightMode () const |
| Returns the flight mode for Land. | |
| virtual QString | takeOffFlightMode () const |
| Returns the flight mode for TakeOff. | |
| virtual QString | motorDetectionFlightMode () const |
| Returns the flight mode for Motor Detection. | |
| virtual QString | stabilizedFlightMode () const |
| Returns the flight mode for Stabilized. | |
| virtual QString | takeControlFlightMode () const |
| Returns the flight mode to use when the operator wants to take back control from autonomouse flight. | |
| virtual QString | followFlightMode () const |
| Returns the flight mode which the vehicle will be for follow me. | |
| virtual void | guidedModeLand (Vehicle *vehicle) const |
| Command vehicle to land at current location. | |
| virtual bool | guidedModeROI (Vehicle *vehicle, const QGeoCoordinate &roiCenterCoord, double relativeAltitudeMeters) 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 const remapParamNameMajorVersionMap_t & | paramNameRemapMajorVersionMap () const |
| virtual int | remapParamNameHigestMinorVersionNumber (int) const |
| virtual bool | multiRotorCoaxialMotors (Vehicle *) const |
| virtual bool | multiRotorXConfig (Vehicle *) const |
| virtual QString | offlineEditingParamFile (Vehicle *) const |
| Return the resource file which contains the set of params loaded for offline editing. | |
| virtual QString | vehicleImageOpaque (const Vehicle *) const |
| Return the resource file which contains the vehicle icon used in the flight view when the view is dark (Satellite for instance). | |
| virtual QString | vehicleImageOutline (const Vehicle *) const |
| Return the resource file which contains the vehicle icon used in the flight view when the view is light (Map for instance). | |
| virtual QGCCameraManager * | createCameraManager (Vehicle *vehicle) const |
| Creates vehicle camera manager. | |
| virtual MavlinkCameraControlInterface * | 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 Autotune * | createAutotune (Vehicle *vehicle) const |
| Creates Autotune object. | |
| virtual void | updateAvailableFlightModes (FlightModeList &flightModeList) |
| Update Available flight modes received from vehicle. | |
| ParameterMetaData * | loadParameterMetaData (const Vehicle *vehicle) |
| void | cacheParameterMetaDataFile (const QString &metaDataFile) |
Static Public Member Functions | |
| static QPair< QMetaObject::Connection, QMetaObject::Connection > | startCompensatingBaro (Vehicle *vehicle) |
| static bool | stopCompensatingBaro (const Vehicle *vehicle, QPair< QMetaObject::Connection, QMetaObject::Connection > updaters) |
| static qreal | calcAltOffsetPT (uint32_t atmospheric1, qreal temperature1, uint32_t atmospheric2, qreal temperature2) |
| static qreal | calcAltOffsetP (uint32_t atmospheric1, uint32_t atmospheric2) |
| Static Public Member Functions inherited from FirmwarePlugin | |
| static QString | stableFirmwareSettingsKey (const Vehicle *vehicle) |
| Settings key identifying the stable firmware stream (firmware + vehicle class) for this vehicle. | |
| static bool | isStableFirmwareVersionUnseen (const QString &latestVersion, const QString &seenVersion) |
Protected Member Functions | |
| APMFirmwarePlugin (QObject *parent=nullptr) | |
| All access to singleton is through stack specific implementation. | |
| virtual | ~APMFirmwarePlugin () |
| void | setSupportedModes (QList< APMCustomMode > supportedModes) |
| Protected Member Functions inherited from FirmwarePlugin | |
| bool | _armVehicleAndValidate (Vehicle *vehicle) const |
| void | _sendROICommand (Vehicle *vehicle, const QGeoCoordinate &coord, MAV_FRAME frame, float altitude) const |
| Build + send MAV_CMD_DO_SET_ROI_LOCATION (COMMAND_INT when the vehicle supports it). | |
| bool | _setFlightModeAndValidate (Vehicle *vehicle, const QString &flightMode) const |
| QString | _cachedParameterMetaDataFile (const Vehicle *vehicle) const |
| virtual void | _versionFileDownloadFinished (const QString &remoteFile, const QString &localFile, Vehicle *vehicle) const |
| Callback to process file with latest release information. | |
| void | _setModeEnumToModeStringMapping (FlightModeCustomModeMap enumToString) |
| virtual uint32_t | _convertToCustomFlightModeEnum (uint32_t val) const |
| void | _updateFlightModeList (FlightModeList &flightModeList) |
| void | _addNewFlightMode (FirmwareFlightMode &flightMode) |
Protected Attributes | |
| bool | _coaxialMotors = false |
| const QString | _guidedFlightMode = tr("Guided") |
| const QString | _rtlFlightMode = tr("RTL") |
| const QString | _smartRtlFlightMode = tr("Smart RTL") |
| const QString | _autoFlightMode = tr("Auto") |
| Protected Attributes inherited from FirmwarePlugin | |
| FlightModeList | _flightModeList |
| FlightModeCustomModeMap | _modeEnumToString |
| QVariantList | _toolIndicatorList |
| QVariantList | _modeIndicatorList |
Additional Inherited Members | |
| Public Types inherited from FirmwarePlugin | |
| enum | FirmwareCapabilities { SetFlightModeCapability = 1 << 0 , PauseVehicleCapability = 1 << 1 , GuidedModeCapability = 1 << 2 , OrbitModeCapability = 1 << 3 , TakeoffVehicleCapability = 1 << 4 , ROIModeCapability = 1 << 5 , ChangeHeadingCapability = 1 << 6 , GuidedTakeoffCapability = 1 << 7 , VTOLMulticopterTakeoffCapability = 1 << 8 } |
| 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 inherited from FirmwarePlugin | |
| void | toolIndicatorsChanged () |
This is the base class for all stack specific APM firmware plugins.
Definition at line 22 of file APMFirmwarePlugin.h.
|
explicitprotected |
All access to singleton is through stack specific implementation.
Definition at line 35 of file APMFirmwarePlugin.cc.
References _autoFlightMode, _guidedFlightMode, _rtlFlightMode, FirmwarePlugin::_setModeEnumToModeStringMapping(), _smartRtlFlightMode, APMFirmwarePlugin(), APMCustomMode::AUTO, FirmwarePlugin::FirmwarePlugin(), APMCustomMode::GUIDED, APMCustomMode::RTL, APMCustomMode::SMART_RTL, and FirmwarePlugin::updateAvailableFlightModes().
Referenced by APMFirmwarePlugin(), ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(), ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(), ArduRoverFirmwarePlugin::ArduRoverFirmwarePlugin(), and ArduSubFirmwarePlugin::ArduSubFirmwarePlugin().
|
protectedvirtual |
Definition at line 56 of file APMFirmwarePlugin.cc.
|
inlineoverridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 58 of file APMFirmwarePlugin.h.
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 608 of file APMFirmwarePlugin.cc.
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 709 of file APMFirmwarePlugin.cc.
References Vehicle::firmwareMajorVersion(), Vehicle::firmwareMinorVersion(), QGCMAVLink::vehicleClass(), and Vehicle::vehicleType().
|
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.
| vehicle | Vehicle message came from |
| message[in,out] | Mavlink message to adjust if needed. |
Reimplemented from FirmwarePlugin.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 291 of file APMFirmwarePlugin.cc.
References Vehicle::firmwarePluginInstanceData(), Vehicle::id(), and initializeStreamRates().
Referenced by ArduSubFirmwarePlugin::adjustIncomingMavlinkMessage().
|
overridevirtual |
Called before any mavlink message is sent to the Vehicle so plugin can adjust any message characteristics. This is handy to adjust or differences in mavlink spec implementations such that the base code can remain mavlink generic.
This method must be thread safe.
@param vehicle Vehicle message came from @param outgoingLink Link that messae is going out on @param message[in,out] Mavlink message to adjust if needed.
Reimplemented from FirmwarePlugin.
Definition at line 331 of file APMFirmwarePlugin.cc.
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 61 of file APMFirmwarePlugin.cc.
|
static |
Definition at line 1337 of file APMFirmwarePlugin.cc.
References ALT_METERS, and ALT_OFFSET_P.
Referenced by startCompensatingBaro().
|
static |
Definition at line 1329 of file APMFirmwarePlugin.cc.
References ALT_OFFSET_PT.
Referenced by startCompensatingBaro().
|
overridevirtual |
Creates the vehicle's guided action readiness. The base readiness does not know which flight modes the guided actions use, so firmware with takeoff or mission modes returns a subclass that declares them.
Reimplemented from FirmwarePlugin.
Definition at line 1076 of file APMFirmwarePlugin.cc.
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 1413 of file APMFirmwarePlugin.cc.
References Vehicle::multiRotor().
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 1275 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::parameterExists(), and Vehicle::parameterManager().
|
overridevirtual |
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 from FirmwarePlugin.
Definition at line 97 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_modeEnumToString, and flightMode().
Referenced by flightMode(), and setFlightMode().
|
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 85 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_flightModeList.
|
overridevirtual |
gets hobbs meter from autopilot. This should be reimplmeented for each firmware
Reimplemented from FirmwarePlugin.
Definition at line 613 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::getParameter(), ParameterManager::parameterExists(), Vehicle::parameterManager(), and Fact::rawValue().
|
inlineoverridevirtual |
Returns the flight mode which the vehicle will be in if it is performing a goto location.
Reimplemented from FirmwarePlugin.
Reimplemented in ArduCopterFirmwarePlugin.
Definition at line 42 of file APMFirmwarePlugin.h.
References guidedFlightMode().
|
virtual |
Definition at line 673 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_convertToCustomFlightModeEnum(), _guidedFlightMode, FirmwarePlugin::_modeEnumToString, and APMCustomMode::GUIDED.
Referenced by gotoFlightMode(), ArduCopterFirmwarePlugin::gotoFlightMode(), isGuidedMode(), setGuidedMode(), startMission(), and ArduCopterFirmwarePlugin::takeOffFlightMode().
|
overridevirtual |
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 from FirmwarePlugin.
Reimplemented in ArduRoverFirmwarePlugin.
Definition at line 855 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_setFlightModeAndValidate(), VehicleFactGroup::altitudeRelative(), Vehicle::defaultComponentId(), MAVLinkProtocol::getComponentId(), Vehicle::id(), MAVLinkProtocol::instance(), FirmwarePlugin::pauseFlightMode(), pauseVehicle(), VehicleLinkManager::primaryLink(), Fact::rawValue(), Vehicle::sendMessageOnLinkThreadSafe(), setGuidedMode(), QGC::showAppMessage(), and Vehicle::vehicleLinkManager().
|
overridevirtual |
Command vehicle to change equivalent airspeed
| airspeed_equiv | Equivalent airspeed in m/s |
Reimplemented from FirmwarePlugin.
Definition at line 1281 of file APMFirmwarePlugin.cc.
References Vehicle::defaultComponentId(), and Vehicle::sendMavCommand().
|
overridevirtual |
Command vehicle to change groundspeed
| groundspeed | Groundspeed in m/s |
Reimplemented from FirmwarePlugin.
Definition at line 924 of file APMFirmwarePlugin.cc.
References Vehicle::defaultComponentId(), and Vehicle::sendMavCommand().
|
overridevirtual |
Command vehicle to rotate towards specified location.
Reimplemented from FirmwarePlugin.
Definition at line 943 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::ChangeHeadingCapability, Vehicle::coordinate(), ParameterManager::defaultComponentId, Vehicle::defaultComponentId(), ParameterManager::getParameter(), VehicleFactGroup::heading(), isCapable(), ParameterManager::parameterExists(), Vehicle::parameterManager(), Fact::rawValue(), Vehicle::sendMavCommand(), and QGC::showAppMessage().
|
overridevirtual |
Command vehicle to move to specified location (altitude is ignored, vehicle uses current altitude)
Reimplemented from FirmwarePlugin.
Definition at line 784 of file APMFirmwarePlugin.cc.
References _MAV_CMD_DO_REPOSITION_ResultHandler(), VehicleFactGroup::altitudeAMSL(), VehicleFactGroup::altitudeRelative(), Vehicle::defaultComponentId(), Vehicle::firmwarePluginInstanceData(), Vehicle::missionManager(), Fact::rawValue(), VehicleTypes::MavCmdAckHandlerInfo_s::resultHandler, VehicleTypes::MavCmdAckHandlerInfo_s::resultHandlerData, Vehicle::sendMavCommandIntWithHandler(), setGuidedMode(), QGC::showAppMessage(), and MissionManager::writeArduPilotGuidedMissionItem().
|
overridevirtual |
Command vehicle to return to launch.
Reimplemented from FirmwarePlugin.
Definition at line 850 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_setFlightModeAndValidate(), rtlFlightMode(), and smartRTLFlightMode().
|
overridevirtual |
Command vehicle to takeoff from current location to the specified height.
Reimplemented from FirmwarePlugin.
Definition at line 938 of file APMFirmwarePlugin.cc.
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 631 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::parameterExists(), and Vehicle::parameterManager().
|
virtual |
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 394 of file APMFirmwarePlugin.cc.
References SettingsManager::apmMavlinkStreamRateSettings(), Vehicle::firmwarePluginInstanceData(), SettingsManager::instance(), Vehicle::requestDataStream(), Vehicle::sendMavCommand(), and Vehicle::setFirmwarePluginInstanceData().
Referenced by adjustIncomingMavlinkMessage(), and initializeVehicle().
|
overridevirtual |
Called when Vehicle is first created to perform any firmware specific setup.
Reimplemented from FirmwarePlugin.
Definition at line 511 of file APMFirmwarePlugin.cc.
References initializeStreamRates(), SettingsManager::instance(), Vehicle::isOfflineEditingVehicle(), FirmwarePlugin::offlineEditingParamFile(), Vehicle::setFirmwareVersion(), and VideoSettings::videoSource3DRSolo.
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 66 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::ChangeHeadingCapability, Vehicle::fixedWing(), FirmwarePlugin::GuidedModeCapability, FirmwarePlugin::GuidedTakeoffCapability, Vehicle::multiRotor(), FirmwarePlugin::PauseVehicleCapability, FirmwarePlugin::ROIModeCapability, FirmwarePlugin::SetFlightModeCapability, Vehicle::sub(), FirmwarePlugin::TakeoffVehicleCapability, and Vehicle::vtol().
Referenced by guidedModeChangeHeading().
|
overridevirtual |
Returns whether the vehicle is in guided mode or not.
Reimplemented from FirmwarePlugin.
Definition at line 653 of file APMFirmwarePlugin.cc.
References Vehicle::flightMode(), and guidedFlightMode().
|
inlineoverridevirtual |
returns true if this flight stack supports MAV_CMD_DO_SET_MODE
Reimplemented from FirmwarePlugin.
Definition at line 40 of file APMFirmwarePlugin.h.
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 1245 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::getParameter(), FirmwarePlugin::maximumEquivalentAirspeed(), ParameterManager::parameterExists(), Vehicle::parameterManager(), and Fact::rawValue().
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 906 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::getParameter(), FirmwarePlugin::maximumHorizontalSpeedMultirotorMetersSecond(), ParameterManager::parameterExists(), Vehicle::parameterManager(), and Fact::rawValue().
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 1260 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::getParameter(), FirmwarePlugin::minimumEquivalentAirspeed(), ParameterManager::parameterExists(), Vehicle::parameterManager(), and Fact::rawValue().
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 984 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::getParameter(), FirmwarePlugin::minimumTakeoffAltitudeMeters(), ParameterManager::parameterExists(), Vehicle::parameterManager(), Fact::rawValue(), and Vehicle::vtol().
|
overridevirtual |
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 from FirmwarePlugin.
Definition at line 587 of file APMFirmwarePlugin.cc.
References QGCMAVLink::VehicleClassFixedWing, QGCMAVLinkTypes::VehicleClassGeneric, QGCMAVLink::VehicleClassMultiRotor, QGCMAVLink::VehicleClassRoverBoat, QGCMAVLink::VehicleClassSub, and QGCMAVLink::VehicleClassVTOL.
|
overridevirtual |
Returns the flight mode for running missions.
Reimplemented from FirmwarePlugin.
Definition at line 668 of file APMFirmwarePlugin.cc.
References _autoFlightMode, FirmwarePlugin::_convertToCustomFlightModeEnum(), FirmwarePlugin::_modeEnumToString, and APMCustomMode::AUTO.
Referenced by startMission().
|
overridevirtual |
Reimplemented from FirmwarePlugin.
Definition at line 898 of file APMFirmwarePlugin.cc.
References ParameterManager::defaultComponentId, ParameterManager::parameterExists(), and Vehicle::parameterManager().
|
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 756 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_setFlightModeAndValidate(), and FirmwarePlugin::pauseFlightMode().
Referenced by guidedModeChangeAltitude(), and setGuidedMode().
|
overridevirtual |
Returns the flight mode for RTL.
Reimplemented from FirmwarePlugin.
Reimplemented in ArduSubFirmwarePlugin.
Definition at line 658 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_convertToCustomFlightModeEnum(), FirmwarePlugin::_modeEnumToString, _rtlFlightMode, and APMCustomMode::RTL.
Referenced by guidedModeRTL().
|
overridevirtual |
Sends the appropriate mavlink message for follow me support.
Reimplemented from FirmwarePlugin.
Definition at line 1176 of file APMFirmwarePlugin.cc.
References MAVLinkProtocol::getComponentId(), FollowMe::HEADING, FollowMe::GCSMotionReport::headingDegrees, Vehicle::homePosition(), MAVLinkProtocol::instance(), FollowMe::GCSMotionReport::lat_int, FollowMe::GCSMotionReport::lon_int, FollowMe::POS, VehicleLinkManager::primaryLink(), qgcApp, Vehicle::sendMessageOnLinkThreadSafe(), QGC::showAppMessage(), Vehicle::vehicleLinkManager(), FollowMe::VEL, FollowMe::GCSMotionReport::vxMetersPerSec, FollowMe::GCSMotionReport::vyMetersPerSec, and FollowMe::GCSMotionReport::vzMetersPerSec.
|
inlineoverridevirtual |
Determines how to handle the first item of the mission item list. Internally to QGC the first item is always the home position. Generic stack does not want home position sent in the first position. Subsequent sequence numbers must be adjusted. This is the mavlink spec default.
Reimplemented from FirmwarePlugin.
Definition at line 55 of file APMFirmwarePlugin.h.
|
overridevirtual |
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 from FirmwarePlugin.
Definition at line 107 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_flightModeList, and flightMode().
|
overridevirtual |
Set guided flight mode.
Reimplemented from FirmwarePlugin.
Definition at line 747 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_setFlightModeAndValidate(), guidedFlightMode(), and pauseVehicle().
Referenced by guidedModeChangeAltitude(), and guidedModeGotoLocation().
|
inlineprotected |
Definition at line 85 of file APMFirmwarePlugin.h.
|
overridevirtual |
Returns the flight mode for Smart RTL.
Reimplemented from FirmwarePlugin.
Definition at line 663 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_convertToCustomFlightModeEnum(), FirmwarePlugin::_modeEnumToString, _smartRtlFlightMode, and APMCustomMode::SMART_RTL.
Referenced by guidedModeRTL().
|
static |
Definition at line 1345 of file APMFirmwarePlugin.cc.
References Vehicle::airborne(), calcAltOffsetP(), calcAltOffsetPT(), Vehicle::getInitialGCSPressure(), Vehicle::getInitialGCSTemperature(), QGCSensors::QGCAmbientTemperature::instance(), QGCSensors::QGCPressure::instance(), QGCSensors::QGCPressure::pressureUpdated(), and QGCSensors::QGCAmbientTemperature::temperatureUpdated().
|
overridevirtual |
Command the vehicle to start the mission.
Reimplemented from FirmwarePlugin.
Definition at line 1081 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_armVehicleAndValidate(), FirmwarePlugin::_setFlightModeAndValidate(), Vehicle::armed(), Vehicle::defaultComponentId(), Vehicle::fixedWing(), guidedFlightMode(), missionFlightMode(), Vehicle::sendMavCommand(), QGC::showAppMessage(), Vehicle::underway(), and Vehicle::vtol().
|
overridevirtual |
Command the vehicle to start a takeoff.
Reimplemented from FirmwarePlugin.
Definition at line 1057 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::_armVehicleAndValidate(), FirmwarePlugin::_setFlightModeAndValidate(), Vehicle::airborne(), QGC::showAppMessage(), and FirmwarePlugin::takeOffFlightMode().
|
static |
Definition at line 1393 of file APMFirmwarePlugin.cc.
|
overridevirtual |
List of supported mission commands. Empty list for all commands supported.
Reimplemented from FirmwarePlugin.
Definition at line 528 of file APMFirmwarePlugin.cc.
References SettingsManager::instance(), QGCMAVLink::VehicleClassFixedWing, QGCMAVLinkTypes::VehicleClassGeneric, QGCMAVLink::VehicleClassMultiRotor, and QGCMAVLink::VehicleClassVTOL.
|
overridevirtual |
Returns the list of toolbar tool indicators associated with a vehicle signals toolIndicatorsChanged
Reimplemented from FirmwarePlugin.
Definition at line 640 of file APMFirmwarePlugin.cc.
References FirmwarePlugin::toolIndicators().
|
protected |
Definition at line 92 of file APMFirmwarePlugin.h.
Referenced by APMFirmwarePlugin(), and missionFlightMode().
|
protected |
Definition at line 87 of file APMFirmwarePlugin.h.
Referenced by ArduCopterFirmwarePlugin::multiRotorCoaxialMotors().
|
protected |
Definition at line 89 of file APMFirmwarePlugin.h.
Referenced by APMFirmwarePlugin(), and guidedFlightMode().
|
protected |
Definition at line 90 of file APMFirmwarePlugin.h.
Referenced by APMFirmwarePlugin(), and rtlFlightMode().
|
protected |
Definition at line 91 of file APMFirmwarePlugin.h.
Referenced by APMFirmwarePlugin(), and smartRTLFlightMode().