Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
18b73fb9
Commit
18b73fb9
authored
Feb 02, 2014
by
Lorenz Meier
Browse files
PX4 config: Cleanup in RC value handling.
parent
2415ed38
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/QGCPX4VehicleConfig.cc
View file @
18b73fb9
...
...
@@ -1423,6 +1423,7 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval)
}
}
// Reverse raw value
rcValueReversed
[
chan
]
=
(
rcRev
[
chan
])
?
rcMax
[
chan
]
-
(
fval
-
rcMin
[
chan
])
:
fval
;
// Normalized value
...
...
@@ -1441,7 +1442,7 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval)
normalized
=
(
rcRev
[
chan
])
?
-
1.0
f
*
normalized
:
normalized
;
// Find correct mapped channel
rcMappedValueRev
[
rcToFunctionMapping
[
chan
]]
=
(
rc
Rev
[
chan
])
?
rcMax
[
chan
]
-
(
fval
-
rcMin
[
chan
])
:
fval
;
rcMappedValueRev
[
rcToFunctionMapping
[
chan
]]
=
rc
ValueReversed
[
chan
]
;
rcMappedValue
[
rcToFunctionMapping
[
chan
]]
=
fval
;
// Copy min / max
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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