QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
AutoPilotPlugin.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4#include <QtCore/QString>
5#include <QtCore/QVariantList>
6#include <QtQmlIntegration/QtQmlIntegration>
7
9class Vehicle;
11
17
18class AutoPilotPlugin : public QObject
19{
20 Q_OBJECT
21 QML_ELEMENT
22 QML_UNCREATABLE("")
23 Q_PROPERTY(QVariantList vehicleComponents READ vehicleComponents NOTIFY vehicleComponentsChanged)
24 Q_PROPERTY(bool setupComplete READ setupComplete NOTIFY setupCompleteChanged)
25
26public:
27 explicit AutoPilotPlugin(Vehicle *vehicle, QObject *parent = nullptr);
28 virtual ~AutoPilotPlugin();
29
30 // Vehicle Components which are available for firmware types
42
43
45 virtual void parametersReadyPreChecks();
46
47 // Must be implemented by derived class
48 virtual const QVariantList &vehicleComponents() = 0;
49
51 Q_INVOKABLE virtual QString prerequisiteSetup(VehicleComponent *component) const = 0;
52
54 Q_INVOKABLE bool knownVehicleComponentAvailable(KnownVehicleComponent knownVehicleComponent) { return (findKnownVehicleComponent(knownVehicleComponent) != nullptr); }
55
57 Q_INVOKABLE VehicleComponent *findKnownVehicleComponent(KnownVehicleComponent knownVehicleComponent);
58
59 bool setupComplete() const { return _setupComplete; }
60
61signals:
64
65protected:
66 Vehicle *_vehicle = nullptr;
68 bool _setupComplete = false;
69
70private slots:
71 void _recalcSetupComplete();
72};
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
virtual void parametersReadyPreChecks()
void vehicleComponentsChanged()
virtual ~AutoPilotPlugin()
void setupCompleteChanged()
FirmwarePlugin * _firmwarePlugin
bool setupComplete() const
Q_INVOKABLE bool knownVehicleComponentAvailable(KnownVehicleComponent knownVehicleComponent)
Returns true if the vehicle component is available for the vehicle. Customs build have different comp...
Q_INVOKABLE VehicleComponent * findKnownVehicleComponent(KnownVehicleComponent knownVehicleComponent)
Returns the VehicleComponent for the knownVehicleComponent. Returns nullptr if not available.
virtual Q_INVOKABLE QString prerequisiteSetup(VehicleComponent *component) const =0
Returns the name of the vehicle component which must complete setup prior to this one....
virtual const QVariantList & vehicleComponents()=0
The FirmwarePlugin class represents the methods and objects which are specific to a certain Firmware ...
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...