Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
be595333
Commit
be595333
authored
Feb 25, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Perf: Loaders and async loading
parent
c3a427b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
41 deletions
+78
-41
qgroundcontrol.qrc
qgroundcontrol.qrc
+3
-1
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+7
-40
VirtualJoystick.qml
src/FlightDisplay/VirtualJoystick.qml
+68
-0
No files found.
qgroundcontrol.qrc
View file @
be595333
...
...
@@ -88,11 +88,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>
...
...
src/FlightDisplay/FlightDisplayView.qml
View file @
be595333
...
...
@@ -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
}
}
}
src/FlightDisplay/VirtualJoystick.qml
0 → 100644
View file @
be595333
/*=====================================================================
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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment