QGCHilFlightGearConfiguration.h 1.8 KB
Newer Older
1
#pragma once
2 3 4 5 6

#include <QWidget>

#include "QGCHilLink.h"
#include "QGCFlightGearLink.h"
7
#include "Vehicle.h"
8

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

11 12 13 14 15 16 17 18 19
namespace Ui {
class QGCHilFlightGearConfiguration;
}

class QGCHilFlightGearConfiguration : public QWidget
{
    Q_OBJECT
    
public:
20
    explicit QGCHilFlightGearConfiguration(Vehicle* vehicle, QWidget *parent = 0);
21 22 23 24 25 26
    ~QGCHilFlightGearConfiguration();

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

private:
33
    Vehicle*    _vehicle;
Don Gagne's avatar
Don Gagne committed
34 35 36 37 38 39 40
    Ui::QGCHilFlightGearConfiguration _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
41

Don Gagne's avatar
Don Gagne committed
42 43 44 45 46 47 48 49 50
    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
    
51 52
signals:
     void barometerOffsetChanged(float barometerOffsetkPa);
53 54
};