ArduRoverFirmwarePlugin.h 2.4 KB
Newer Older
1 2
/****************************************************************************
 *
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.
 *
 ****************************************************************************/

10 11 12 13 14 15 16 17 18 19 20 21 22

/// @file
///     @author Pritam Ghanghas <pritam.ghanghas@gmail.com>

#ifndef ArduRoverFirmwarePlugin_H
#define ArduRoverFirmwarePlugin_H

#include "APMFirmwarePlugin.h"

class APMRoverMode : public APMCustomMode
{
public:
    enum Mode {
Don Gagne's avatar
Don Gagne committed
23 24 25 26 27
        MANUAL          = 0,
        ACRO            = 1,
        STEERING        = 3,
        HOLD            = 4,
        LOITER          = 5,
28 29 30 31
#if 0
    // Follow me not ready for Stable
        FOLLOW          = 6,
#endif
Don Gagne's avatar
Don Gagne committed
32 33 34 35 36 37
        SIMPLE          = 7,
        AUTO            = 10,
        RTL             = 11,
        SMART_RTL       = 12,
        GUIDED          = 15,
        INITIALIZING    = 16,
38 39 40 41 42 43 44 45 46 47
    };

    APMRoverMode(uint32_t mode, bool settable);
};

class ArduRoverFirmwarePlugin : public APMFirmwarePlugin
{
    Q_OBJECT
    
public:
48
    ArduRoverFirmwarePlugin(void);
49 50

    // Overrides from FirmwarePlugin
51 52
    QString pauseFlightMode                         (void) const override { return QStringLiteral("Hold"); }
    QString followFlightMode                        (void) const override { return QStringLiteral("Follow"); }
53 54
    void    guidedModeChangeAltitude                (Vehicle* vehicle, double altitudeChange) final;
    int     remapParamNameHigestMinorVersionNumber  (int majorVersionNumber) const final;
55 56 57 58 59 60 61 62
    const   FirmwarePlugin::remapParamNameMajorVersionMap_t& paramNameRemapMajorVersionMap(void) const final { return _remapParamName; }
    bool    supportsNegativeThrust                  (Vehicle *) final;
    bool    supportsSmartRTL                        (void) const override { return true; }
    QString offlineEditingParamFile                 (Vehicle* vehicle) override { Q_UNUSED(vehicle); return QStringLiteral(":/FirmwarePlugin/APM/Rover.OfflineEditing.params"); }
#if 0
    // Follow me not ready for Stable
    void    sendGCSMotionReport                     (Vehicle* vehicle, FollowMe::GCSMotionReport& motionReport, uint8_t estimatationCapabilities) override;
#endif
63 64 65 66

private:
    static bool _remapParamNameIntialized;
    static FirmwarePlugin::remapParamNameMajorVersionMap_t  _remapParamName;
67 68 69
};

#endif