Skip to content
APMAutoPilotPlugin.h 2.09 KiB
Newer Older
/****************************************************************************
 *
 *   (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

#ifndef APMAutoPilotPlugin_H
#define APMAutoPilotPlugin_H
Don Gagne's avatar
Don Gagne committed

#include "AutoPilotPlugin.h"
#include "Vehicle.h"

class APMAirframeComponent;
class APMAirframeLoader;
class APMFlightModesComponent;
class APMRadioComponent;
class APMTuningComponent;
class APMSafetyComponent;
class APMSensorsComponent;
Don Gagne's avatar
Don Gagne committed
class APMPowerComponent;
class APMMotorComponent;
Don Gagne's avatar
Don Gagne committed
class APMCameraComponent;
class APMLightsComponent;
class APMSubFrameComponent;
DonLakeFlyer's avatar
DonLakeFlyer committed
class APMHeliComponent;
Don Gagne's avatar
Don Gagne committed

/// This is the APM specific implementation of the AutoPilot class.
class APMAutoPilotPlugin : public AutoPilotPlugin
Don Gagne's avatar
Don Gagne committed
{
    Q_OBJECT
Don Gagne's avatar
Don Gagne committed
public:
    APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent);
    ~APMAutoPilotPlugin();

    // Overrides from AutoPilotPlugin
    const QVariantList& vehicleComponents(void) override;
    QString prerequisiteSetup(VehicleComponent* component) const override;
protected:
    bool                        _incorrectParameterVersion; ///< true: parameter version incorrect, setup not allowed
Don Gagne's avatar
Don Gagne committed
    APMAirframeComponent*       _airframeComponent;
Don Gagne's avatar
Don Gagne committed
    APMCameraComponent*         _cameraComponent;
    APMLightsComponent*         _lightsComponent;
    APMSubFrameComponent*       _subFrameComponent;
Don Gagne's avatar
Don Gagne committed
    APMFlightModesComponent*    _flightModesComponent;
Don Gagne's avatar
Don Gagne committed
    APMPowerComponent*          _powerComponent;
    APMMotorComponent*          _motorComponent;
Don Gagne's avatar
Don Gagne committed
    APMRadioComponent*          _radioComponent;
Don Gagne's avatar
Don Gagne committed
    APMSafetyComponent*         _safetyComponent;
Don Gagne's avatar
Don Gagne committed
    APMSensorsComponent*        _sensorsComponent;
Don Gagne's avatar
Don Gagne committed
    APMTuningComponent*         _tuningComponent;
Don Gagne's avatar
Don Gagne committed
    APMAirframeLoader*          _airframeFacts;
    ESP8266Component*           _esp8266Component;
DonLakeFlyer's avatar
DonLakeFlyer committed
    APMHeliComponent*           _heliComponent;

private:
    QVariantList                _components;