APMAutoPilotPlugin.h 2.13 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

class APMAirframeComponent;
class APMFlightModesComponent;
class APMRadioComponent;
class APMTuningComponent;
class APMSafetyComponent;
class APMSensorsComponent;
Don Gagne's avatar
Don Gagne committed
23
class APMPowerComponent;
24
class APMMotorComponent;
Don Gagne's avatar
Don Gagne committed
25
class APMCameraComponent;
26
class APMLightsComponent;
27
class APMSubFrameComponent;
28
class ESP8266Component;
DonLakeFlyer's avatar
DonLakeFlyer committed
29
class APMHeliComponent;
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;
52
    APMMotorComponent*          _motorComponent;
Don Gagne's avatar
Don Gagne committed
53
    APMRadioComponent*          _radioComponent;
Don Gagne's avatar
Don Gagne committed
54
    APMSafetyComponent*         _safetyComponent;
Don Gagne's avatar
Don Gagne committed
55
    APMSensorsComponent*        _sensorsComponent;
Don Gagne's avatar
Don Gagne committed
56
    APMTuningComponent*         _tuningComponent;
57
    ESP8266Component*           _esp8266Component;
DonLakeFlyer's avatar
DonLakeFlyer committed
58
    APMHeliComponent*           _heliComponent;
59

60
#if !defined(NO_SERIAL_LINK) && !defined(__android__)
61 62
private slots:
    void _checkForBadCubeBlack(void);
63
#endif
64

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

69
#endif