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
64fa20a3
Commit
64fa20a3
authored
Mar 15, 2015
by
Don Gagne
Browse files
Validate RC_CHAN_COUNT
parent
bf9c2150
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/PX4/FlightModesComponentController.cc
View file @
64fa20a3
...
...
@@ -69,7 +69,11 @@ void FlightModesComponentController::_validateConfiguration(void)
{
_validConfiguration
=
true
;
_channelCount
=
_autoPilotPlugin
->
factExists
(
"RC_CHAN_CNT"
)
?
_autoPilotPlugin
->
getFact
(
"RC_CHAN_CNT"
)
->
value
().
toInt
()
:
18
;
_channelCount
=
_autoPilotPlugin
->
factExists
(
"RC_CHAN_CNT"
)
?
_autoPilotPlugin
->
getFact
(
"RC_CHAN_CNT"
)
->
value
().
toInt
()
:
_chanMax
;
if
(
_channelCount
<=
0
||
_channelCount
>
_chanMax
)
{
// Parameter exists, but has not yet been set or is invalid. Use default
_channelCount
=
_chanMax
;
}
// Make sure switches are valid and within channel range
...
...
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