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
8371276c
Commit
8371276c
authored
May 12, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix value reading, only real32 was correct."
This reverts commit
ec799d44
.
parent
f468db1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
20 deletions
+5
-20
UAS.cc
src/uas/UAS.cc
+5
-20
No files found.
src/uas/UAS.cc
View file @
8371276c
...
...
@@ -2584,7 +2584,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
(
QChar
((
unsigned
char
)
paramValue
.
param_float
));
}
else
{
param
=
QVariant
(
QChar
((
u
int8_t
)
paramValue
.
param_float
));
param
=
QVariant
(
QChar
((
u
nsigned
char
)
paramValue
.
param_uint8
));
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2599,7 +2599,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
(
QChar
((
char
)
paramValue
.
param_float
));
}
else
{
param
=
QVariant
(
QChar
((
int8_t
)
paramValue
.
param_float
));
param
=
QVariant
(
QChar
((
char
)
paramValue
.
param_int8
));
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2614,7 +2614,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
((
short
)
paramValue
.
param_float
);
}
else
{
param
=
QVariant
(
(
int16_t
)
paramValue
.
param_float
);
param
=
QVariant
(
paramValue
.
param_int16
);
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2623,28 +2623,13 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
//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
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_UINT32
:
{
if
(
getAutopilotType
()
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
param
=
QVariant
((
unsigned
int
)
paramValue
.
param_float
);
}
else
{
param
=
QVariant
(
(
uint32_t
)
paramValue
.
param_float
);
param
=
QVariant
(
paramValue
.
param_uint32
);
}
parameters
.
value
(
compId
)
->
insert
(
paramName
,
param
);
// Emit change
...
...
@@ -2658,7 +2643,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
param
=
QVariant
((
int
)
paramValue
.
param_float
);
}
else
{
param
=
QVariant
(
(
int32_t
)
paramValue
.
param_float
);
param
=
QVariant
(
paramValue
.
param_int32
);
}
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