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
8a6fe130
Commit
8a6fe130
authored
Feb 07, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PX4 Fact enum meta data support
parent
34ee1349
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
PX4ParameterMetaData.cc
src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc
+18
-0
PX4MockLink.params
src/comm/PX4MockLink.params
+1
-1
No files found.
src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc
View file @
8a6fe130
...
...
@@ -320,6 +320,24 @@ void PX4ParameterMetaData::_loadParameterFactMetaData(void)
metaData
->
setRebootRequired
(
true
);
}
}
else
if
(
elementName
==
"values"
)
{
// doing nothing individual value will follow anyway. May be used for sanity checking.
}
else
if
(
elementName
==
"value"
)
{
QString
enumValueStr
=
xml
.
attributes
().
value
(
"code"
).
toString
();
QString
enumString
=
xml
.
readElementText
();
qCDebug
(
PX4ParameterMetaDataLog
)
<<
"parameter value:"
<<
"value desc:"
<<
enumString
<<
"code:"
<<
enumValueStr
;
QVariant
enumValue
;
QString
errorString
;
if
(
metaData
->
convertAndValidateRaw
(
enumValueStr
,
false
/* validate */
,
enumValue
,
errorString
))
{
metaData
->
addEnumInfo
(
enumString
,
enumValue
);
}
else
{
qCDebug
(
PX4ParameterMetaDataLog
)
<<
"Invalid enum value, name:"
<<
metaData
->
name
()
<<
" type:"
<<
metaData
->
type
()
<<
" value:"
<<
enumValueStr
<<
" error:"
<<
errorString
;
}
}
else
{
qDebug
()
<<
"Unknown element in XML: "
<<
elementName
;
}
...
...
src/comm/PX4MockLink.params
View file @
8a6fe130
...
...
@@ -507,7 +507,7 @@
1 50 SENS_FLOW_ROT 0 6
1 50 SYS_AUTOCONFIG 0 6
1 50 SYS_AUTOSTART 10016 6
1 50 SYS_COMPANION 0 6
1 50 SYS_COMPANION
15760
0 6
1 50 SYS_RESTART_TYPE 0 6
1 50 SYS_USE_IO 1 6
1 50 TEST_D 0.01 9
...
...
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