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
0775d444
Commit
0775d444
authored
Feb 25, 2017
by
nanthony21
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved deadband indicators to the right side column.
parent
d4dbe920
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+13
-0
JoystickConfigController.cc
src/VehicleSetup/JoystickConfigController.cc
+3
-1
No files found.
src/VehicleSetup/JoystickConfig.qml
View file @
0775d444
...
...
@@ -105,6 +105,7 @@ SetupPage {
width
:
_deadbandWidth
height
:
parent
.
height
/
2
color
:
"
#8c161a
"
visible
:
controller
.
deadbandToggle
property
real
_percentDeadband
:
((
2
*
deadbandValue
)
/
(
32768.0
*
2
))
property
real
_deadbandWidth
:
parent
.
width
*
_percentDeadband
...
...
@@ -743,6 +744,18 @@ SetupPage {
axisMonitorRepeater
.
itemAt
(
axis
).
loader
.
item
.
deadbandValue
=
value
}
}
onDeadbandToggled
:
{
if
(
value
)
{
for
(
var
i
=
0
;
i
<
_activeJoystick
.
axisCount
;
i
++
)
{
axisMonitorRepeater
.
itemAt
(
i
).
loader
.
item
.
deadbandBarVisible
=
true
}
}
else
{
for
(
var
i
=
0
;
i
<
_activeJoystick
.
axisCount
;
i
++
)
{
axisMonitorRepeater
.
itemAt
(
i
).
loader
.
item
.
deadbandBarVisible
=
false
}
}
}
}
Repeater
{
...
...
src/VehicleSetup/JoystickConfigController.cc
View file @
0775d444
...
...
@@ -257,7 +257,7 @@ void JoystickConfigController::_inputCenterWaitBegin(Joystick::AxisFunction_t fu
Q_UNUSED
(
function
);
//sensing deadband
if
(
abs
(
value
)
*
1.1
f
>
_rgAxisInfo
[
axis
].
deadband
)
{
//add 10% on top of existing deadband
if
(
(
abs
(
value
)
*
1.1
f
>
_rgAxisInfo
[
axis
].
deadband
)
&&
(
_activeJoystick
->
deadband
())
)
{
//add 10% on top of existing deadband
_axisDeadbandChanged
(
axis
,
abs
(
value
)
*
1.1
f
);
}
...
...
@@ -451,6 +451,7 @@ void JoystickConfigController::_resetInternalCalibrationValues(void)
info
->
function
=
Joystick
::
maxFunction
;
info
->
reversed
=
false
;
info
->
deadband
=
0
;
emit
axisDeadbandChanged
(
i
,
info
->
deadband
);
info
->
axisMin
=
JoystickConfigController
::
_calCenterPoint
;
info
->
axisMax
=
JoystickConfigController
::
_calCenterPoint
;
info
->
axisTrim
=
JoystickConfigController
::
_calCenterPoint
;
...
...
@@ -489,6 +490,7 @@ void JoystickConfigController::_setInternalCalibrationValuesFromSettings(void)
info
->
axisMax
=
calibration
.
max
;
info
->
reversed
=
calibration
.
reversed
;
info
->
deadband
=
calibration
.
deadband
;
emit
axisDeadbandChanged
(
axis
,
info
->
deadband
);
qCDebug
(
JoystickConfigControllerLog
)
<<
"Read settings name:axis:min:max:trim:reversed"
<<
joystick
->
name
()
<<
axis
<<
info
->
axisMin
<<
info
->
axisMax
<<
info
->
axisTrim
<<
info
->
reversed
;
}
...
...
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