MavlinkSettings.qml 3.75 KB
Newer Older
1 2 3 4 5 6 7 8
/****************************************************************************
 *
 *   (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.
 *
 ****************************************************************************/
dogmaphobic's avatar
dogmaphobic committed
9 10 11 12 13 14 15 16 17


import QtQuick                  2.5
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.2
import QtQuick.Dialogs          1.1

import QGroundControl                       1.0
import QGroundControl.FactSystem            1.0
Don Gagne's avatar
Don Gagne committed
18
import QGroundControl.FactControls          1.0
dogmaphobic's avatar
dogmaphobic committed
19 20 21 22 23 24
import QGroundControl.Controls              1.0
import QGroundControl.ScreenTools           1.0
import QGroundControl.MultiVehicleManager   1.0
import QGroundControl.Palette               1.0

Rectangle {
25
    id:             __mavlinkRoot
26
    color:          qgcPal.window
27
    anchors.fill:   parent
dogmaphobic's avatar
dogmaphobic committed
28

29
    QGCPalette { id: qgcPal }
dogmaphobic's avatar
dogmaphobic committed
30

Don Gagne's avatar
Don Gagne committed
31
    QGCFlickable {
dogmaphobic's avatar
dogmaphobic committed
32 33 34 35
        clip:               true
        anchors.fill:       parent
        anchors.margins:    ScreenTools.defaultFontPixelWidth
        contentHeight:      settingsColumn.height
Don Gagne's avatar
Don Gagne committed
36
        contentWidth:       settingsColumn.width
dogmaphobic's avatar
dogmaphobic committed
37 38 39 40 41

        Column {
            id:                 settingsColumn
            spacing:            ScreenTools.defaultFontPixelHeight
            anchors.margins:    ScreenTools.defaultFontPixelWidth
Don Gagne's avatar
Don Gagne committed
42 43
            anchors.left:       parent.left
            anchors.top:        parent.top
dogmaphobic's avatar
dogmaphobic committed
44
            //-----------------------------------------------------------------
45 46 47 48
            //-- System ID
            Row {
                spacing:    ScreenTools.defaultFontPixelWidth
                QGCLabel {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
49
                    text:   qsTr("Ground Station MavLink System ID:")
50 51 52 53 54 55 56 57 58 59 60 61 62 63
                    anchors.verticalCenter: parent.verticalCenter
                }
                QGCTextField {
                    id:     sysidField
                    text:   QGroundControl.mavlinkSystemID.toString()
                    width:  ScreenTools.defaultFontPixelWidth * 6
                    inputMethodHints:       Qt.ImhFormattedNumbersOnly
                    anchors.verticalCenter: parent.verticalCenter
                    onEditingFinished: {
                        QGroundControl.mavlinkSystemID = parseInt(sysidField.text)
                    }
                }
            }
            //-----------------------------------------------------------------
dogmaphobic's avatar
dogmaphobic committed
64 65
            //-- Mavlink Heartbeats
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
66
                text:       qsTr("Emit heartbeat")
67
                checked:    QGroundControl.multiVehicleManager.gcsHeartBeatEnabled
dogmaphobic's avatar
dogmaphobic committed
68
                onClicked: {
69
                    QGroundControl.multiVehicleManager.gcsHeartBeatEnabled = checked
dogmaphobic's avatar
dogmaphobic committed
70 71 72 73 74
                }
            }
            //-----------------------------------------------------------------
            //-- Mavlink Multiplexing
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
75
                text:       qsTr("Enable multiplexing (forward packets to all other links)")
dogmaphobic's avatar
dogmaphobic committed
76 77 78 79 80
                checked:    QGroundControl.isMultiplexingEnabled
                onClicked: {
                    QGroundControl.isMultiplexingEnabled = checked
                }
            }
Don Gagne's avatar
Don Gagne committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

            // Mavlink version
            Row {
                spacing: ScreenTools.defaultFontPixelWidth

                QGCLabel {
                    text: qsTr("Mavlink Version:")
                    anchors.baseline: mavlinkVersionCombo.baseline
                }

                FactComboBox {
                    id:         mavlinkVersionCombo
                    width:      ScreenTools.defaultFontPixelWidth * 45
                    indexModel: false
                    fact:       QGroundControl.mavlinkVersion
dogmaphobic's avatar
dogmaphobic committed
96 97 98 99 100
                }
            }
        }
    }
}