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
ec799d44
Commit
ec799d44
authored
Apr 29, 2014
by
treymarc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix value reading, only real32 was correct.
parent
cbb366b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
UAS.cc
src/uas/UAS.cc
+20
-5
No files found.
src/uas/UAS.cc
View file @
ec799d44
...
...
@@ -2583,7 +2583,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
(
QChar
((
unsigned
char
)
paramValue
.
param_float
));
}
else
{
param
=
QVariant
(
QChar
((
u
nsigned
char
)
paramValue
.
param_uint8
));
param
=
QVariant
(
QChar
((
u
int8_t
)
paramValue
.
param_float
));
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2598,7 +2598,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
(
QChar
((
char
)
paramValue
.
param_float
));
}
else
{
param
=
QVariant
(
QChar
((
char
)
paramValue
.
param_int8
));
param
=
QVariant
(
QChar
((
int8_t
)
paramValue
.
param_float
));
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2613,7 +2613,22 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
((
short
)
paramValue
.
param_float
);
}
else
{
param
=
QVariant
(
paramValue
.
param_int16
);
param
=
QVariant
((
int16_t
)
paramValue
.
param_float
);
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
emit
parameterChanged
(
uasId
,
compId
,
paramName
,
param
);
emit
parameterChanged
(
uasId
,
compId
,
rawValue
.
param_count
,
rawValue
.
param_index
,
paramName
,
param
);
//qDebug() << "RECEIVED PARAM:" << param;
}
break
;
case
MAV_PARAM_TYPE_UINT16
:
{
if
(
getAutopilotType
()
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
param
=
QVariant
((
unsigned
short
)
paramValue
.
param_float
);
}
else
{
param
=
QVariant
((
uint16_t
)
paramValue
.
param_float
);
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2628,7 +2643,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
((
unsigned
int
)
paramValue
.
param_float
);
}
else
{
param
=
QVariant
(
paramValue
.
param_uint32
);
param
=
QVariant
(
(
uint32_t
)
paramValue
.
param_float
);
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2642,7 +2657,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
((
int
)
paramValue
.
param_float
);
}
else
{
param
=
QVariant
(
paramValue
.
param_int32
);
param
=
QVariant
(
(
int32_t
)
paramValue
.
param_float
);
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
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