APMAutoPilotPlugin.h 2.25 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9
 *
 * 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;
DonLakeFlyer's avatar
DonLakeFlyer committed
30
class APMFollowComponent;
Don Gagne's avatar
Don Gagne committed
31

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

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

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

45 46
protected:
    bool                        _incorrectParameterVersion; ///< true: parameter version incorrect, setup not allowed
Don Gagne's avatar
Don Gagne committed
47
    APMAirframeComponent*       _airframeComponent;
Don Gagne's avatar
Don Gagne committed
48
    APMCameraComponent*         _cameraComponent;
49
    APMLightsComponent*         _lightsComponent;
50
    APMSubFrameComponent*       _subFrameComponent;
Don Gagne's avatar
Don Gagne committed
51
    APMFlightModesComponent*    _flightModesComponent;
Don Gagne's avatar
Don Gagne committed
52
    APMPowerComponent*          _powerComponent;
53
    APMMotorComponent*          _motorComponent;
Don Gagne's avatar
Don Gagne committed
54
    APMRadioComponent*          _radioComponent;
Don Gagne's avatar
Don Gagne committed
55
    APMSafetyComponent*         _safetyComponent;
Don Gagne's avatar
Don Gagne committed
56
    APMSensorsComponent*        _sensorsComponent;
Don Gagne's avatar
Don Gagne committed
57
    APMTuningComponent*         _tuningComponent;
58
    ESP8266Component*           _esp8266Component;
DonLakeFlyer's avatar
DonLakeFlyer committed
59
    APMHeliComponent*           _heliComponent;
60 61
#if 0
    // Follow me not ready for Stable
DonLakeFlyer's avatar
DonLakeFlyer committed
62
    APMFollowComponent*         _followComponent;
63
#endif
64

65
#if !defined(NO_SERIAL_LINK) && !defined(__android__)
66 67
private slots:
    void _checkForBadCubeBlack(void);
68
#endif
69

70 71
private:
    QVariantList                _components;
Don Gagne's avatar
Don Gagne committed
72 73
};

74
#endif