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
186f0bff
Commit
186f0bff
authored
Oct 13, 2015
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated enum conversion function
parent
c9123adf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
37 deletions
+1
-37
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+1
-37
No files found.
src/FactSystem/ParameterLoader.cc
View file @
186f0bff
...
...
@@ -602,42 +602,6 @@ void ParameterLoader::_writeLocalParamCache()
ds
<<
cache_map
;
}
static
MAV_PARAM_TYPE
factType2MavParamType
(
int
factType
)
{
MAV_PARAM_TYPE
paramType
;
switch
(
factType
)
{
case
FactMetaData
:
:
valueTypeUint8
:
paramType
=
MAV_PARAM_TYPE_UINT8
;
break
;
case
FactMetaData
:
:
valueTypeInt8
:
paramType
=
MAV_PARAM_TYPE_INT8
;
break
;
case
FactMetaData
:
:
valueTypeUint16
:
paramType
=
MAV_PARAM_TYPE_UINT16
;
break
;
case
FactMetaData
:
:
valueTypeInt16
:
paramType
=
MAV_PARAM_TYPE_INT16
;
break
;
case
FactMetaData
:
:
valueTypeUint32
:
paramType
=
MAV_PARAM_TYPE_UINT32
;
break
;
case
FactMetaData
:
:
valueTypeInt32
:
paramType
=
MAV_PARAM_TYPE_INT32
;
break
;
case
FactMetaData
:
:
valueTypeFloat
:
paramType
=
MAV_PARAM_TYPE_REAL32
;
break
;
case
FactMetaData
:
:
valueTypeDouble
:
paramType
=
MAV_PARAM_TYPE_REAL64
;
break
;
default:
paramType
=
MAV_PARAM_TYPE_INT32
;
qCritical
()
<<
"Unsupported fact type"
<<
factType
;
break
;
}
return
paramType
;
}
void
ParameterLoader
::
_tryCacheHashLoad
(
int
uasId
,
QVariant
hash_value
)
{
uint32_t
crc32_value
=
0
;
...
...
@@ -673,7 +637,7 @@ void ParameterLoader::_tryCacheHashLoad(int uasId, QVariant hash_value)
foreach
(
int
id
,
cache_map
[
component
].
keys
())
{
const
QString
&
name
=
cache_map
[
component
][
id
].
first
;
const
QVariant
&
value
=
cache_map
[
component
][
id
].
second
.
second
;
const
int
mavType
=
factType2MavParamType
(
cache_map
[
component
][
id
].
second
.
first
);
const
int
mavType
=
_factTypeToMavType
(
static_cast
<
FactMetaData
::
ValueType_t
>
(
cache_map
[
component
][
id
].
second
.
first
)
);
_parameterUpdate
(
uasId
,
component
,
name
,
count
,
id
,
mavType
,
value
);
}
}
...
...
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