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
13a9a09b
Commit
13a9a09b
authored
Jan 26, 2018
by
nanthony21
Committed by
Nick Anthony
Feb 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deadband bar now turns green when it has been clicked on.
parent
4c591cfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+5
-1
No files found.
src/VehicleSetup/JoystickConfig.qml
View file @
13a9a09b
...
@@ -86,6 +86,7 @@ SetupPage {
...
@@ -86,6 +86,7 @@ SetupPage {
property
int
axisValue
:
0
property
int
axisValue
:
0
property
int
deadbandValue
:
0
property
int
deadbandValue
:
0
property
bool
narrowIndicator
:
false
property
bool
narrowIndicator
:
false
property
color
deadbandColor
:
"
#8c161a
"
property
color
__barColor
:
qgcPal
.
windowShade
property
color
__barColor
:
qgcPal
.
windowShade
...
@@ -105,7 +106,7 @@ SetupPage {
...
@@ -105,7 +106,7 @@ SetupPage {
x
:
_deadbandPosition
x
:
_deadbandPosition
width
:
_deadbandWidth
width
:
_deadbandWidth
height
:
parent
.
height
/
2
height
:
parent
.
height
/
2
color
:
"
#8c161a
"
color
:
deadbandColor
visible
:
controller
.
deadbandToggle
visible
:
controller
.
deadbandToggle
property
real
_percentDeadband
:
((
2
*
deadbandValue
)
/
(
32768.0
*
2
))
property
real
_percentDeadband
:
((
2
*
deadbandValue
)
/
(
32768.0
*
2
))
...
@@ -801,11 +802,13 @@ SetupPage {
...
@@ -801,11 +802,13 @@ SetupPage {
MouseArea
{
MouseArea
{
id
:
deadbandMouseArea
id
:
deadbandMouseArea
anchors.fill
:
parent
.
item
anchors.fill
:
parent
.
item
enabled
:
controller
.
deadbandToggle
property
real
startY
property
real
startY
onPressed
:
{
onPressed
:
{
startY
=
mouseY
startY
=
mouseY
parent
.
item
.
deadbandColor
=
"
#3C6315
"
}
}
onPositionChanged
:
{
onPositionChanged
:
{
var
newValue
=
parent
.
item
.
deadbandValue
+
(
startY
-
mouseY
)
*
15
var
newValue
=
parent
.
item
.
deadbandValue
+
(
startY
-
mouseY
)
*
15
...
@@ -814,6 +817,7 @@ SetupPage {
...
@@ -814,6 +817,7 @@ SetupPage {
}
}
onReleased
:
{
onReleased
:
{
controller
.
setDeadbandValue
(
modelData
,
parent
.
item
.
deadbandValue
)
controller
.
setDeadbandValue
(
modelData
,
parent
.
item
.
deadbandValue
)
parent
.
item
.
deadbandColor
=
"
#8c161a
"
}
}
}
}
}
}
...
...
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