MavlinkSettings.qml 3.84 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 18 19 20 21 22 23


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
import QGroundControl.Controls              1.0
import QGroundControl.ScreenTools           1.0
import QGroundControl.MultiVehicleManager   1.0
import QGroundControl.Palette               1.0

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

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

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

        Column {
            id:                 settingsColumn
            spacing:            ScreenTools.defaultFontPixelHeight
            anchors.margins:    ScreenTools.defaultFontPixelWidth
Don Gagne's avatar
Don Gagne committed
41 42
            anchors.left:       parent.left
            anchors.top:        parent.top
dogmaphobic's avatar
dogmaphobic committed
43
            QGCLabel {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
44
                text:   qsTr("MavLink Settings")
45
                font.pointSize: ScreenTools.mediumFontPointSize
dogmaphobic's avatar
dogmaphobic committed
46 47 48 49 50 51 52
            }
            Rectangle {
                height: 1
                width:  parent.width
                color:  qgcPal.button
            }
            //-----------------------------------------------------------------
53 54 55 56
            //-- System ID
            Row {
                spacing:    ScreenTools.defaultFontPixelWidth
                QGCLabel {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
57
                    text:   qsTr("Ground Station MavLink System ID:")
58 59 60 61 62 63 64 65 66 67 68 69 70 71
                    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
72 73
            //-- Mavlink Heartbeats
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
74
                text:       qsTr("Emit heartbeat")
75
                checked:    QGroundControl.multiVehicleManager.gcsHeartBeatEnabled
dogmaphobic's avatar
dogmaphobic committed
76
                onClicked: {
77
                    QGroundControl.multiVehicleManager.gcsHeartBeatEnabled = checked
dogmaphobic's avatar
dogmaphobic committed
78 79 80 81 82
                }
            }
            //-----------------------------------------------------------------
            //-- Mavlink Multiplexing
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
83
                text:       qsTr("Enable multiplexing (forward packets to all other links)")
dogmaphobic's avatar
dogmaphobic committed
84 85 86 87 88 89 90 91
                checked:    QGroundControl.isMultiplexingEnabled
                onClicked: {
                    QGroundControl.isMultiplexingEnabled = checked
                }
            }
            //-----------------------------------------------------------------
            //-- Mavlink Version Check
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
92
                text:       qsTr("Only accept MAVs with same protocol version")
dogmaphobic's avatar
dogmaphobic committed
93 94 95 96 97 98 99 100
                checked:    QGroundControl.isVersionCheckEnabled
                onClicked: {
                    QGroundControl.isVersionCheckEnabled = checked
                }
            }
        }
    }
}