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
3dbce41a
Commit
3dbce41a
authored
Jul 09, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix channel monitor when reversed
parent
fe9969a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
RadioComponent.qml
src/AutoPilotPlugins/Common/RadioComponent.qml
+1
-1
RadioComponentController.cc
src/AutoPilotPlugins/Common/RadioComponentController.cc
+3
-3
RCChannelMonitor.qml
src/QmlControls/RCChannelMonitor.qml
+1
-1
No files found.
src/AutoPilotPlugins/Common/RadioComponent.qml
View file @
3dbce41a
...
...
@@ -203,10 +203,10 @@ QGCView {
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
parent
.
height
*
0.75
height
:
width
x
:
((
Math
.
abs
((
rcValue
-
_pwmMin
)
-
(
reversed
?
_pwmMin
:
0
))
/
_pwmRange
)
*
parent
.
width
)
-
(
width
/
2
)
radius
:
width
/
2
color
:
qgcPal
.
text
visible
:
mapped
x
:
(((
reversed
?
_pwmMax
-
rcValue
:
rcValue
-
_pwmMin
)
/
_pwmRange
)
*
parent
.
width
)
-
(
width
/
2
)
}
QGCLabel
{
...
...
src/AutoPilotPlugins/Common/RadioComponentController.cc
View file @
3dbce41a
...
...
@@ -403,8 +403,6 @@ void RadioComponentController::_inputStickDetect(enum rcCalFunctions function, i
if
(
_stickSettleComplete
(
value
))
{
ChannelInfo
*
info
=
&
_rgChannelInfo
[
channel
];
qCDebug
(
RadioComponentControllerLog
)
<<
"_inputStickDetect settle complete, function:channel:value"
<<
function
<<
channel
<<
value
;
// Stick detection is complete. Stick should be at max position.
// Map the channel to the function
_rgFunctionChannelMapping
[
function
]
=
channel
;
...
...
@@ -413,6 +411,8 @@ void RadioComponentController::_inputStickDetect(enum rcCalFunctions function, i
// Channel should be at max value, if it is below initial set point the the channel is reversed.
info
->
reversed
=
value
<
_rcValueSave
[
channel
];
qCDebug
(
RadioComponentControllerLog
)
<<
"_inputStickDetect settle complete, function:channel:value:reversed"
<<
function
<<
channel
<<
value
<<
info
->
reversed
;
if
(
info
->
reversed
)
{
_rgChannelInfo
[
channel
].
rcMin
=
value
;
}
else
{
...
...
@@ -885,9 +885,9 @@ void RadioComponentController::_stopCalibration(void)
/// @brief Saves the current channel values, so that we can detect when the use moves an input.
void
RadioComponentController
::
_rcCalSaveCurrentValues
(
void
)
{
qCDebug
(
RadioComponentControllerLog
)
<<
"_rcCalSaveCurrentValues"
;
for
(
int
i
=
0
;
i
<
_chanMax
();
i
++
)
{
_rcValueSave
[
i
]
=
_rcRawValue
[
i
];
qCDebug
(
RadioComponentControllerLog
)
<<
"_rcCalSaveCurrentValues channel:value"
<<
i
<<
_rcValueSave
[
i
];
}
}
...
...
src/QmlControls/RCChannelMonitor.qml
View file @
3dbce41a
...
...
@@ -67,7 +67,7 @@ FactPanel {
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
parent
.
height
*
0.75
height
:
width
x
:
((
Math
.
abs
((
rcValue
-
_pwmMin
)
-
(
reversed
?
_pwmMin
:
0
)
)
/
_pwmRange
)
*
parent
.
width
)
-
(
width
/
2
)
x
:
((
(
reversed
?
_pwmMax
-
rcValue
:
rcValue
-
_pwmMin
)
/
_pwmRange
)
*
parent
.
width
)
-
(
width
/
2
)
radius
:
width
/
2
color
:
qgcPal
.
text
visible
:
mapped
...
...
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