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
fd1272ea
Commit
fd1272ea
authored
Mar 04, 2015
by
Lorenz Meier
Browse files
Merge pull request #1303 from DonLakeFlyer/RCCal
Set new RC_CHAN_CNT param after cal
parents
9c22edf9
637f5716
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/qgcunittest/MockQGCUASParamManager.cc
View file @
fd1272ea
...
...
@@ -102,3 +102,14 @@ void MockQGCUASParamManager::_loadParams(void)
_mapParams
[
paramName
]
=
paramValue
;
}
}
QList
<
int
>
MockQGCUASParamManager
::
getComponentForParam
(
const
QString
&
parameter
)
const
{
if
(
_mapParams
.
contains
(
parameter
))
{
QList
<
int
>
list
;
list
<<
50
;
return
list
;
}
else
{
return
QList
<
int
>
();
}
}
src/qgcunittest/MockQGCUASParamManager.h
View file @
fd1272ea
...
...
@@ -77,7 +77,7 @@ public:
public:
// Unimplemented QGCUASParamManagerInterface overrides
virtual
QList
<
int
>
getComponentForParam
(
const
QString
&
parameter
)
const
{
Q_ASSERT
(
false
);
Q_UNUSED
(
parameter
);
return
_bogusQListInt
;
}
virtual
QList
<
int
>
getComponentForParam
(
const
QString
&
parameter
)
const
;
virtual
void
setParamDescriptions
(
const
QMap
<
QString
,
QString
>&
paramDescs
)
{
Q_ASSERT
(
false
);
Q_UNUSED
(
paramDescs
);
}
virtual
int
countPendingParams
()
{
Q_ASSERT
(
false
);
return
0
;
}
virtual
UASParameterDataModel
*
dataModel
()
{
Q_ASSERT
(
false
);
return
NULL
;
}
...
...
src/ui/px4_configuration/PX4RCCalibration.cc
View file @
fd1272ea
...
...
@@ -924,6 +924,11 @@ void PX4RCCalibration::_writeCalibration(void)
paramMgr
->
setPendingParam
(
0
,
_rgFunctionInfo
[
i
].
parameterName
,
paramChannel
);
}
// If the RC_CHAN_COUNT parameter is available write the channel count
if
(
paramMgr
->
getComponentForParam
(
"RC_CHAN_CNT"
).
count
()
!=
0
)
{
paramMgr
->
setPendingParam
(
0
,
"RC_CHAN_CNT"
,
_chanCount
);
}
//let the param mgr manage sending all the pending RC_foo updates and persisting after
paramMgr
->
sendPendingParameters
(
true
,
true
);
...
...
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