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
7f893689
Commit
7f893689
authored
Apr 02, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #608 from vooon/fix-error-603
Fix bug #603 save INT8/UINT8 parameters to file
parents
78e555c6
e3f6a388
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
UASParameterDataModel.cc
src/uas/UASParameterDataModel.cc
+10
-1
No files found.
src/uas/UASParameterDataModel.cc
View file @
7f893689
...
...
@@ -309,6 +309,9 @@ void UASParameterDataModel::readUpdateParamsFromStream( QTextStream& stream)
case
MAV_PARAM_TYPE_INT32
:
updatePendingParamWithValue
(
componentId
,
key
,
QVariant
(
valStr
.
toInt
()));
break
;
case
MAV_PARAM_TYPE_INT8
:
updatePendingParamWithValue
(
componentId
,
key
,
QVariant
((
unsigned
char
)
valStr
.
toUInt
()));
break
;
default:
qDebug
()
<<
"FAILED LOADING PARAM"
<<
key
<<
"UNKNOWN DATA TYPE"
;
}
...
...
@@ -355,8 +358,14 @@ void UASParameterDataModel::writeOnboardParamsToStream( QTextStream &stream, con
paramValue
=
paramValue
.
arg
((
double
)
j
.
value
().
toFloat
(),
25
,
'g'
,
6
);
paramType
=
paramType
.
arg
(
MAV_PARAM_TYPE_REAL32
);
break
;
case
QMetaType
:
:
QChar
:
case
QMetaType
:
:
Char
:
// see UAS::setParameter()
paramValue
=
paramValue
.
arg
((
unsigned
char
)
j
.
value
().
toUInt
());
paramType
=
paramType
.
arg
(
MAV_PARAM_TYPE_INT8
);
break
;
default:
qCritical
()
<<
"ABORTED PARAM WRITE TO FILE, NO VALID QVARIANT TYPE"
<<
j
.
value
();
qCritical
()
<<
"ABORTED PARAM WRITE TO FILE,
PARAM '"
<<
j
.
key
()
<<
"'
NO VALID QVARIANT TYPE"
<<
j
.
value
();
return
;
}
stream
<<
this
->
uasId
<<
"
\t
"
<<
compid
<<
"
\t
"
<<
j
.
key
()
<<
"
\t
"
<<
paramValue
<<
"
\t
"
<<
paramType
<<
"
\n
"
;
...
...
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