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
aa2b46e6
Unverified
Commit
aa2b46e6
authored
May 14, 2019
by
Don Gagne
Committed by
GitHub
May 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7216 from Williangalvani/fixDeadband
Change joystick deadband adjustment to dragging horizontally
parents
5cc3f3dc
831d2f86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+11
-7
No files found.
src/VehicleSetup/JoystickConfig.qml
View file @
aa2b46e6
...
...
@@ -849,20 +849,24 @@ SetupPage {
MouseArea
{
id
:
deadbandMouseArea
anchors.fill
:
parent
.
item
enabled
:
controller
.
deadbandToggle
id
:
deadbandMouseArea
anchors.fill
:
parent
.
item
enabled
:
controller
.
deadbandToggle
preventStealing
:
true
property
real
startY
property
real
startX
property
real
direction
onPressed
:
{
startY
=
mouseY
startX
=
mouseX
direction
=
startX
>
width
/
2
?
1
:
-
1
parent
.
item
.
deadbandColor
=
"
#3C6315
"
}
onPositionChanged
:
{
var
newValue
=
parent
.
item
.
deadbandValue
+
(
startY
-
mouseY
)
*
15
var
mouseToDeadband
=
32768
/
(
width
/
2
)
// Factor to have deadband follow the mouse movement
var
newValue
=
parent
.
item
.
deadbandValue
+
direction
*
(
mouseX
-
startX
)
*
mouseToDeadband
if
((
newValue
>
0
)
&&
(
newValue
<
32768
)){
parent
.
item
.
deadbandValue
=
newValue
;}
start
Y
=
mouseY
start
X
=
mouseX
}
onReleased
:
{
controller
.
setDeadbandValue
(
modelData
,
parent
.
item
.
deadbandValue
)
...
...
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