Skip to content
APMAutoPilotPlugin.h 2.25 KiB
Newer Older
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
 * (c) 2009-2020 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 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;
DonLakeFlyer's avatar
 
DonLakeFlyer committed
class APMFollowComponent;
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;
    ESP8266Component*           _esp8266Component;
DonLakeFlyer's avatar
DonLakeFlyer committed
    APMHeliComponent*           _heliComponent;
DoinLakeFlyer's avatar
 
DoinLakeFlyer committed
#if 0
    // Follow me not ready for Stable
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    APMFollowComponent*         _followComponent;
DoinLakeFlyer's avatar
 
DoinLakeFlyer committed
#endif
Don Gagne's avatar
 
Don Gagne committed
#if !defined(NO_SERIAL_LINK) && !defined(__android__)
Don Gagne's avatar
 
Don Gagne committed
private slots:
    void _checkForBadCubeBlack(void);
Don Gagne's avatar
 
Don Gagne committed
#endif
Don Gagne's avatar
 
Don Gagne committed

private:
    QVariantList                _components;