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
99126254
Commit
99126254
authored
Apr 03, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3132 from DonLakeFlyer/RCCal
Radio Cal: Only set reverse for multi-rotor
parents
482ef626
7802cf04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
RadioComponentController.cc
src/AutoPilotPlugins/Common/RadioComponentController.cc
+14
-10
No files found.
src/AutoPilotPlugins/Common/RadioComponentController.cc
View file @
99126254
...
...
@@ -786,16 +786,20 @@ void RadioComponentController::_writeCalibration(void)
paramFact
->
setRawValue
((
float
)
info
->
rcMax
);
}
// APM has a backwards interpretation of "reversed" on the Pitch control. So be careful.
float
reversedParamValue
;
if
(
_px4Vehicle
()
||
info
->
function
!=
rcCalFunctionPitch
)
{
reversedParamValue
=
info
->
reversed
?
-
1.0
f
:
1.0
f
;
}
else
{
reversedParamValue
=
info
->
reversed
?
1.0
f
:
-
1.0
f
;
}
paramFact
=
getParameterFact
(
FactSystem
::
defaultComponentId
,
revTpl
.
arg
(
oneBasedChannel
));
if
(
paramFact
)
{
paramFact
->
setRawValue
(
reversedParamValue
);
// For multi-rotor we can determine reverse setting during radio cal. For anything other than multi-rotor, servo installation
// may affect channel reversing so we can't automatically determine it.
if
(
_vehicle
->
multiRotor
())
{
// APM multi-rotor has a backwards interpretation of "reversed" on the Pitch control. So be careful.
float
reversedParamValue
;
if
(
_px4Vehicle
()
||
info
->
function
!=
rcCalFunctionPitch
)
{
reversedParamValue
=
info
->
reversed
?
-
1.0
f
:
1.0
f
;
}
else
{
reversedParamValue
=
info
->
reversed
?
1.0
f
:
-
1.0
f
;
}
paramFact
=
getParameterFact
(
FactSystem
::
defaultComponentId
,
revTpl
.
arg
(
oneBasedChannel
));
if
(
paramFact
)
{
paramFact
->
setRawValue
(
reversedParamValue
);
}
}
}
...
...
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