MavlinkSettings.qml 3.56 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
            //-----------------------------------------------------------------
44 45 46 47
            //-- System ID
            Row {
                spacing:    ScreenTools.defaultFontPixelWidth
                QGCLabel {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
48
                    text:   qsTr("Ground Station MavLink System ID:")
49 50 51 52 53 54 55 56 57 58 59 60 61 62
                    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
63 64
            //-- Mavlink Heartbeats
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
65
                text:       qsTr("Emit heartbeat")
66
                checked:    QGroundControl.multiVehicleManager.gcsHeartBeatEnabled
dogmaphobic's avatar
dogmaphobic committed
67
                onClicked: {
68
                    QGroundControl.multiVehicleManager.gcsHeartBeatEnabled = checked
dogmaphobic's avatar
dogmaphobic committed
69 70 71 72 73
                }
            }
            //-----------------------------------------------------------------
            //-- Mavlink Multiplexing
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
74
                text:       qsTr("Enable multiplexing (forward packets to all other links)")
dogmaphobic's avatar
dogmaphobic committed
75 76 77 78 79 80 81 82
                checked:    QGroundControl.isMultiplexingEnabled
                onClicked: {
                    QGroundControl.isMultiplexingEnabled = checked
                }
            }
            //-----------------------------------------------------------------
            //-- Mavlink Version Check
            QGCCheckBox {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
83
                text:       qsTr("Only accept MAVs with same protocol version")
dogmaphobic's avatar
dogmaphobic committed
84 85 86 87 88 89 90 91
                checked:    QGroundControl.isVersionCheckEnabled
                onClicked: {
                    QGroundControl.isVersionCheckEnabled = checked
                }
            }
        }
    }
}