Skip to content
APMAutoPilotPlugin.h 3.19 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;
Don Gagne's avatar
Don Gagne committed
class MotorComponent;
Don Gagne's avatar
Don Gagne committed
class APMCameraComponent;
class APMLightsComponent;
class APMSubFrameComponent;
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) final;
Tomaz Canabrava's avatar
Tomaz Canabrava committed
    APMAirframeComponent*       airframeComponent   (void) const { return _airframeComponent; }
    APMCameraComponent*         cameraComponent     (void) const { return _cameraComponent; }
    APMLightsComponent*         lightsComponent     (void) const { return _lightsComponent; }
    APMSubFrameComponent*       subFrameComponent   (void) const { return _subFrameComponent; }
Tomaz Canabrava's avatar
Tomaz Canabrava committed
    APMFlightModesComponent*    flightModesComponent(void) const { return _flightModesComponent; }
    APMPowerComponent*          powerComponent      (void) const { return _powerComponent; }
Don Gagne's avatar
Don Gagne committed
#if 0
    // Temporarily removed, waiting for new command implementation
Don Gagne's avatar
Don Gagne committed
    MotorComponent*             motorComponent      (void) const { return _motorComponent; }
Don Gagne's avatar
Don Gagne committed
#endif
Tomaz Canabrava's avatar
Tomaz Canabrava committed
    APMRadioComponent*          radioComponent      (void) const { return _radioComponent; }
    APMSafetyComponent*         safetyComponent     (void) const { return _safetyComponent; }
    APMSensorsComponent*        sensorsComponent    (void) const { return _sensorsComponent; }
    APMTuningComponent*         tuningComponent     (void) const { return _tuningComponent; }
    ESP8266Component*           esp8266Component    (void) const { return _esp8266Component; }
Don Gagne's avatar
Don Gagne committed

    bool                    _incorrectParameterVersion; ///< true: parameter version incorrect, setup not allowed
    QVariantList            _components;
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;
Don Gagne's avatar
Don Gagne committed
#if 0
    // Temporarily removed, waiting for new command implementation
Don Gagne's avatar
Don Gagne committed
    MotorComponent*             _motorComponent;
Don Gagne's avatar
Don Gagne committed
#endif
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;