Commit 2fcdda7f authored by Don Gagne's avatar Don Gagne

Merge pull request #2898 from DonLakeFlyer/BootTime

Boot perf
parents 14e98c86 be595333
......@@ -93,11 +93,13 @@
<file alias="QGroundControl/FactControls/FactPanel.qml">src/FactSystem/FactControls/FactPanel.qml</file>
<file alias="QGroundControl/FactControls/FactTextField.qml">src/FactSystem/FactControls/FactTextField.qml</file>
<file alias="QGroundControl/FactControls/qmldir">src/FactSystem/FactControls/qmldir</file>
<file alias="QGroundControl/FlightDisplay/qmldir">src/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewMap.qml">src/FlightDisplay/FlightDisplayViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<file alias="QGroundControl/FlightDisplay/qmldir">src/FlightDisplay/qmldir</file>
<file alias="VirtualJoystick.qml">src/FlightDisplay/VirtualJoystick.qml</file>
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
<file alias="QGroundControl/FlightMap/FlightMap.qml">src/FlightMap/FlightMap.qml</file>
......
......@@ -231,58 +231,25 @@ QGCView {
anchors.left: parent.left
anchors.bottom: parent.bottom
height: availableHeight
asynchronous: true
visible: status == Loader.Ready
property bool isBackgroundDark: root.isBackgroundDark
property var qgcView: root
}
//-- Virtual Joystick
Item {
Loader {
id: multiTouchItem
z: _panel.z + 5
width: parent.width - (_flightVideoPipControl.width / 2)
height: thumbAreaHeight
height: Math.min(parent.height * 0.25, ScreenTools.defaultFontPixelWidth * 16)
visible: QGroundControl.virtualTabletJoystick
anchors.bottom: _flightVideoPipControl.top
anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 2
anchors.horizontalCenter: parent.horizontalCenter
readonly property real thumbAreaHeight: Math.min(parent.height * 0.25, ScreenTools.defaultFontPixelWidth * 16)
QGCMapPalette { id: mapPal; lightColors: !isBackgroundDark }
Timer {
interval: 40 // 25Hz, same as real joystick rate
running: QGroundControl.virtualTabletJoystick && _activeVehicle
repeat: true
onTriggered: {
if (_activeVehicle) {
_activeVehicle.virtualTabletJoystickValue(rightStick.xAxis, rightStick.yAxis, leftStick.xAxis, leftStick.yAxis)
}
}
}
JoystickThumbPad {
id: leftStick
anchors.leftMargin: xPositionDelta
anchors.bottomMargin: -yPositionDelta
anchors.left: parent.left
anchors.bottom: parent.bottom
width: parent.thumbAreaHeight
height: parent.thumbAreaHeight
yAxisThrottle: true
lightColors: !isBackgroundDark
}
JoystickThumbPad {
id: rightStick
anchors.rightMargin: -xPositionDelta
anchors.bottomMargin: -yPositionDelta
anchors.right: parent.right
anchors.bottom: parent.bottom
width: parent.thumbAreaHeight
height: parent.thumbAreaHeight
lightColors: !isBackgroundDark
}
source: "qrc:/qml/VirtualJoystick.qml"
active: QGroundControl.virtualTabletJoystick
}
}
}
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
import QtQuick 2.5
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
Item {
QGCMapPalette { id: mapPal; lightColors: !isBackgroundDark }
Timer {
interval: 40 // 25Hz, same as real joystick rate
running: QGroundControl.virtualTabletJoystick && _activeVehicle
repeat: true
onTriggered: {
if (_activeVehicle) {
_activeVehicle.virtualTabletJoystickValue(rightStick.xAxis, rightStick.yAxis, leftStick.xAxis, leftStick.yAxis)
}
}
}
JoystickThumbPad {
id: leftStick
anchors.leftMargin: xPositionDelta
anchors.bottomMargin: -yPositionDelta
anchors.left: parent.left
anchors.bottom: parent.bottom
width: parent.height
height: parent.height
yAxisThrottle: true
lightColors: !isBackgroundDark
}
JoystickThumbPad {
id: rightStick
anchors.rightMargin: -xPositionDelta
anchors.bottomMargin: -yPositionDelta
anchors.right: parent.right
anchors.bottom: parent.bottom
width: parent.height
height: parent.height
lightColors: !isBackgroundDark
}
}
......@@ -205,7 +205,7 @@ Item {
}
function showLeftMenu() {
if(!leftPanel.visible && !leftPanel.item.animateShowDialog.running) {
if(!leftPanel.visible) {
leftPanel.visible = true
leftPanel.item.animateShowDialog.start()
} else if(leftPanel.visible && !leftPanel.item.animateShowDialog.running) {
......@@ -261,6 +261,8 @@ Item {
anchors.fill: parent
visible: false
z: QGroundControl.zOrderTopMost + 100
active: visible
source: "MainWindowLeftPanel.qml"
}
//-- Main UI
......@@ -276,10 +278,6 @@ Item {
isBackgroundDark: flightView.isBackgroundDark
z: QGroundControl.zOrderTopMost
Component.onCompleted: {
leftPanel.source = "MainWindowLeftPanel.qml"
}
onShowSetupView: mainWindow.showSetupView()
onShowPlanView: mainWindow.showPlanView()
onShowFlyView: mainWindow.showFlyView()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment