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
16480717
Commit
16480717
authored
Nov 28, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First experiment with thumbsticks
parent
6c714562
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+4
-5
QGCMapPalette.cc
src/QGCMapPalette.cc
+1
-1
JoystickThumbPad.qml
src/QmlControls/JoystickThumbPad.qml
+2
-1
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
16480717
...
@@ -216,15 +216,15 @@ Item {
...
@@ -216,15 +216,15 @@ Item {
height
:
availableHeight
height
:
availableHeight
}
}
//-- Virtual Joystick
Item
{
Item
{
id
:
multiTouchItem
id
:
multiTouchItem
anchors.left
:
parent
.
left
width
:
parent
.
width
*
0.6
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
height
:
thumbAreaHeight
height
:
thumbAreaHeight
visible
:
QGroundControl
.
virtualTabletJoystick
visible
:
QGroundControl
.
virtualTabletJoystick
anchors.centerIn
:
parent
readonly
property
real
thumbAreaHeight
:
parent
.
height
/
4
readonly
property
real
thumbAreaHeight
:
Math
.
min
(
parent
.
height
*
0.25
,
ScreenTools
.
defaultFontPixelWidth
*
16
)
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
!
isBackgroundDark
}
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
!
isBackgroundDark
}
...
@@ -302,7 +302,6 @@ Item {
...
@@ -302,7 +302,6 @@ Item {
interval
:
10
interval
:
10
running
:
QGroundControl
.
virtualTabletJoystick
running
:
QGroundControl
.
virtualTabletJoystick
repeat
:
true
repeat
:
true
onTriggered
:
{
onTriggered
:
{
if
(
_activeVehicle
)
{
if
(
_activeVehicle
)
{
_activeVehicle
.
virtualTabletJoystickValue
(
rightStick
.
xAxis
,
rightStick
.
yAxis
,
leftStick
.
xAxis
,
leftStick
.
yAxis
)
_activeVehicle
.
virtualTabletJoystickValue
(
rightStick
.
xAxis
,
rightStick
.
yAxis
,
leftStick
.
xAxis
,
leftStick
.
yAxis
)
...
...
src/QGCMapPalette.cc
View file @
16480717
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include <QApplication>
#include <QApplication>
#include <QPalette>
#include <QPalette>
QColor
QGCMapPalette
::
_thumbJoystick
[
QGCMapPalette
::
_cColorGroups
]
=
{
QColor
(
"#ffffff"
),
QColor
(
"#f000000"
)
};
QColor
QGCMapPalette
::
_thumbJoystick
[
QGCMapPalette
::
_cColorGroups
]
=
{
QColor
(
255
,
255
,
255
,
127
),
QColor
(
0
,
0
,
0
,
127
)
};
QGCMapPalette
::
QGCMapPalette
(
QObject
*
parent
)
:
QGCMapPalette
::
QGCMapPalette
(
QObject
*
parent
)
:
QObject
(
parent
)
QObject
(
parent
)
...
...
src/QmlControls/JoystickThumbPad.qml
View file @
16480717
...
@@ -5,9 +5,10 @@ import QGroundControl.Palette 1.0
...
@@ -5,9 +5,10 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
Rectangle
{
Rectangle
{
id
:
_joyRoot
radius
:
width
/
2
radius
:
width
/
2
border.color
:
mapPal
.
thumbJoystick
border.color
:
mapPal
.
thumbJoystick
border.width
:
2
border.width
:
ScreenTools
.
defaultFontPixelWidth
*
0.25
color
:
"
transparent
"
color
:
"
transparent
"
property
alias
lightColors
:
mapPal
.
lightColors
/// true: use light colors from QGCMapPalette for drawing
property
alias
lightColors
:
mapPal
.
lightColors
/// true: use light colors from QGCMapPalette for drawing
...
...
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