QGCHilFlightGearConfiguration.h 1.96 KB
Newer Older
1 2 3 4 5 6 7 8 9
#ifndef QGCHILFLIGHTGEARCONFIGURATION_H
#define QGCHILFLIGHTGEARCONFIGURATION_H

#include <QWidget>

#include "QGCHilLink.h"
#include "QGCFlightGearLink.h"
#include "UAS.h"

Don Gagne's avatar
Don Gagne committed
10 11
#include "ui_QGCHilFlightGearConfiguration.h"

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
namespace Ui {
class QGCHilFlightGearConfiguration;
}

class QGCHilFlightGearConfiguration : public QWidget
{
    Q_OBJECT
    
public:
    explicit QGCHilFlightGearConfiguration(UAS* mav, QWidget *parent = 0);
    ~QGCHilFlightGearConfiguration();

protected:
    
private slots:
    void on_startButton_clicked();
28
    void on_stopButton_clicked();
29
    void on_barometerOffsetLineEdit_textChanged(const QString& baroOffset);
Don Gagne's avatar
Don Gagne committed
30 31
    void _setDefaultOptions(void);
    void _showContextMenu(const QPoint& pt);
32 33

private:
Don Gagne's avatar
Don Gagne committed
34 35 36 37 38 39 40 41
    Ui::QGCHilFlightGearConfiguration _ui;
    UAS* _mav;                                          /// mav associated with this ui

    static const char*  _settingsGroup;                 /// Top level settings group
    const char*         _mavSettingsSubGroup;           /// We maintain a settings sub group per mav type

    static const char*  _mavSettingsSubGroupFixedWing;  /// Subgroup if mav type is MAV_TYPE_FIXED_WING
    static const char*  _mavSettingsSubGroupQuadRotor;  /// Subgroup is mav type is MAV_TYPE_QUADROTOR
42

Don Gagne's avatar
Don Gagne committed
43 44 45 46 47 48 49 50 51
    static const char*  _aircraftKey;                   /// Settings key for aircraft selection
    static const char*  _optionsKey;                    /// Settings key for FlightGear cmd line options
    static const char*  _barometerOffsetKey;            /// Settings key for barometer offset
    static const char*  _sensorHilKey;                  /// Settings key for Sensor Hil checkbox
    
    static const char* _defaultOptions;                 /// Default set of FlightGEar command line options
    
    QAction _resetOptionsAction;                        /// Context menu item to reset options to default
    
52 53
signals:
     void barometerOffsetChanged(float barometerOffsetkPa);
54 55 56
};

#endif // QGCHILFLIGHTGEARCONFIGURATION_H