QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
AutoPilotPlugin Class Referenceabstract

The AutoPilotPlugin class is an abstract base class which represents the methods and objects which are specific to a certain AutoPilot. More...

#include <AutoPilotPlugin.h>

+ Inheritance diagram for AutoPilotPlugin:
+ Collaboration diagram for AutoPilotPlugin:

Public Types

enum  KnownVehicleComponent {
  KnownRadioVehicleComponent , KnownFlightModesVehicleComponent , KnownSensorsVehicleComponent , KnownSafetyVehicleComponent ,
  KnownPowerVehicleComponent , KnownJoystickVehicleComponent , KnownESCVehicleComponent , UnknownVehicleComponent
}
 

Signals

void setupCompleteChanged ()
 
void vehicleComponentsChanged ()
 

Public Member Functions

 AutoPilotPlugin (Vehicle *vehicle, QObject *parent=nullptr)
 < false: One or more vehicle components require setup
 
virtual ~AutoPilotPlugin ()
 
virtual void parametersReadyPreChecks ()
 
virtual const QVariantList & vehicleComponents ()=0
 
virtual Q_INVOKABLE QString prerequisiteSetup (VehicleComponent *component) const =0
 Returns the name of the vehicle component which must complete setup prior to this one. Empty string for none.
 
Q_INVOKABLE bool knownVehicleComponentAvailable (KnownVehicleComponent knownVehicleComponent)
 Returns true if the vehicle component is available for the vehicle. Customs build have different components.
 
Q_INVOKABLE VehicleComponentfindKnownVehicleComponent (KnownVehicleComponent knownVehicleComponent)
 Returns the VehicleComponent for the knownVehicleComponent. Returns nullptr if not available.
 
bool setupComplete () const
 

Protected Attributes

Vehicle_vehicle = nullptr
 
FirmwarePlugin_firmwarePlugin = nullptr
 
bool _setupComplete = false
 

Detailed Description

The AutoPilotPlugin class is an abstract base class which represents the methods and objects which are specific to a certain AutoPilot.

This is the only place where AutoPilot specific code should reside in QGroundControl. The remainder of the QGroundControl source is generic to a common mavlink implementation.

Definition at line 18 of file AutoPilotPlugin.h.

Member Enumeration Documentation

◆ KnownVehicleComponent

Enumerator
KnownRadioVehicleComponent 
KnownFlightModesVehicleComponent 
KnownSensorsVehicleComponent 
KnownSafetyVehicleComponent 
KnownPowerVehicleComponent 
KnownJoystickVehicleComponent 
KnownESCVehicleComponent 
UnknownVehicleComponent 

Definition at line 31 of file AutoPilotPlugin.h.

Constructor & Destructor Documentation

◆ AutoPilotPlugin()

AutoPilotPlugin::AutoPilotPlugin ( Vehicle vehicle,
QObject *  parent = nullptr 
)
explicit

< false: One or more vehicle components require setup

< List of VehicleComponent objects

Definition at line 13 of file AutoPilotPlugin.cc.

◆ ~AutoPilotPlugin()

AutoPilotPlugin::~AutoPilotPlugin ( )
virtual

Definition at line 21 of file AutoPilotPlugin.cc.

Member Function Documentation

◆ findKnownVehicleComponent()

VehicleComponent * AutoPilotPlugin::findKnownVehicleComponent ( KnownVehicleComponent  knownVehicleComponent)

Returns the VehicleComponent for the knownVehicleComponent. Returns nullptr if not available.

Definition at line 70 of file AutoPilotPlugin.cc.

References VehicleComponent::KnownVehicleComponent(), UnknownVehicleComponent, and vehicleComponents().

Referenced by knownVehicleComponentAvailable().

◆ knownVehicleComponentAvailable()

Q_INVOKABLE bool AutoPilotPlugin::knownVehicleComponentAvailable ( KnownVehicleComponent  knownVehicleComponent)
inline

Returns true if the vehicle component is available for the vehicle. Customs build have different components.

Definition at line 54 of file AutoPilotPlugin.h.

References findKnownVehicleComponent().

◆ parametersReadyPreChecks()

void AutoPilotPlugin::parametersReadyPreChecks ( void  )
virtual

Called when parameters are ready for the first time. Note that parameters may still be missing. Overrides must call base class.

Reimplemented in PX4AutoPilotPlugin.

Definition at line 48 of file AutoPilotPlugin.cc.

References _setupComplete, qgcApp, VehicleComponent::setupCompleteChanged(), QGC::showAppMessage(), and vehicleComponents().

Referenced by PX4AutoPilotPlugin::parametersReadyPreChecks().

◆ prerequisiteSetup()

virtual Q_INVOKABLE QString AutoPilotPlugin::prerequisiteSetup ( VehicleComponent component) const
pure virtual

Returns the name of the vehicle component which must complete setup prior to this one. Empty string for none.

Implemented in GenericAutoPilotPlugin, APMAutoPilotPlugin, and PX4AutoPilotPlugin.

◆ setupComplete()

bool AutoPilotPlugin::setupComplete ( ) const
inline

Definition at line 59 of file AutoPilotPlugin.h.

References _setupComplete.

◆ setupCompleteChanged

void AutoPilotPlugin::setupCompleteChanged ( )
signal

◆ vehicleComponents()

virtual const QVariantList & AutoPilotPlugin::vehicleComponents ( )
pure virtual

◆ vehicleComponentsChanged

void AutoPilotPlugin::vehicleComponentsChanged ( )
signal

Member Data Documentation

◆ _firmwarePlugin

FirmwarePlugin* AutoPilotPlugin::_firmwarePlugin = nullptr
protected

Definition at line 67 of file AutoPilotPlugin.h.

◆ _setupComplete

bool AutoPilotPlugin::_setupComplete = false
protected

Definition at line 68 of file AutoPilotPlugin.h.

Referenced by parametersReadyPreChecks(), and setupComplete().

◆ _vehicle


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