APMAutoPilotPlugin.h 2.09 KB
Newer Older
1 2 3 4 5 6 7 8 9
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

Don Gagne's avatar
Don Gagne committed
10

11 12
#ifndef APMAutoPilotPlugin_H
#define APMAutoPilotPlugin_H
Don Gagne's avatar
Don Gagne committed
13

14
#include "AutoPilotPlugin.h"
15
#include "Vehicle.h"
16 17 18 19 20 21 22 23

class APMAirframeComponent;
class APMAirframeLoader;
class APMFlightModesComponent;
class APMRadioComponent;
class APMTuningComponent;
class APMSafetyComponent;
class APMSensorsComponent;
Don Gagne's avatar
Don Gagne committed
24
class APMPowerComponent;
Don Gagne's avatar
Don Gagne committed
25
class MotorComponent;
Don Gagne's avatar
Don Gagne committed
26
class APMCameraComponent;
27
class APMLightsComponent;
28
class APMSubFrameComponent;
29
class ESP8266Component;
Don Gagne's avatar
Don Gagne committed
30

31 32
/// This is the APM specific implementation of the AutoPilot class.
class APMAutoPilotPlugin : public AutoPilotPlugin
Don Gagne's avatar
Don Gagne committed
33 34
{
    Q_OBJECT
35

Don Gagne's avatar
Don Gagne committed
36
public:
37 38 39 40
    APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent);
    ~APMAutoPilotPlugin();

    // Overrides from AutoPilotPlugin
41
    const QVariantList& vehicleComponents(void) override;
42
    QString prerequisiteSetup(VehicleComponent* component) const override;
43

44 45
protected:
    bool                        _incorrectParameterVersion; ///< true: parameter version incorrect, setup not allowed
Don Gagne's avatar
Don Gagne committed
46
    APMAirframeComponent*       _airframeComponent;
Don Gagne's avatar
Don Gagne committed
47
    APMCameraComponent*         _cameraComponent;
48
    APMLightsComponent*         _lightsComponent;
49
    APMSubFrameComponent*       _subFrameComponent;
Don Gagne's avatar
Don Gagne committed
50
    APMFlightModesComponent*    _flightModesComponent;
Don Gagne's avatar
Don Gagne committed
51
    APMPowerComponent*          _powerComponent;
Don Gagne's avatar
Don Gagne committed
52 53
#if 0
    // Temporarily removed, waiting for new command implementation
Don Gagne's avatar
Don Gagne committed
54
    MotorComponent*             _motorComponent;
Don Gagne's avatar
Don Gagne committed
55
#endif
Don Gagne's avatar
Don Gagne committed
56
    APMRadioComponent*          _radioComponent;
Don Gagne's avatar
Don Gagne committed
57
    APMSafetyComponent*         _safetyComponent;
Don Gagne's avatar
Don Gagne committed
58
    APMSensorsComponent*        _sensorsComponent;
Don Gagne's avatar
Don Gagne committed
59
    APMTuningComponent*         _tuningComponent;
Don Gagne's avatar
Don Gagne committed
60
    APMAirframeLoader*          _airframeFacts;
61
    ESP8266Component*           _esp8266Component;
62 63 64

private:
    QVariantList                _components;
Don Gagne's avatar
Don Gagne committed
65 66
};

67
#endif