Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
8a3dfa0a
Commit
8a3dfa0a
authored
Oct 30, 2014
by
Don Gagne
Browse files
commit
parent
d812056a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/uas/UAS.cc
View file @
8a3dfa0a
...
...
@@ -2553,8 +2553,8 @@ void UAS::requestParameter(int component, const QString& parameter)
{
emit
textMessageReceived
(
uasId
,
0
,
MAV_SEVERITY_WARNING
,
QString
(
"QGC WARNING: Parameter name %1 is more than %2 bytes long. This might lead to errors and mishaps!"
).
arg
(
parameter
).
arg
(
MAVLINK_MSG_PARAM_REQUEST_READ_FIELD_PARAM_ID_LEN
-
1
));
}
mem
cpy
(
read
.
param_id
,
parameter
.
toStdString
().
c_str
(),
qMax
(
parameter
.
length
(),
MAVLINK_MSG_PARAM_REQUEST_READ_FIELD_PARAM_ID_LEN
));
read
.
param_id
[
1
5
]
=
'\0'
;
// Enforce null termination
strn
cpy
(
read
.
param_id
,
parameter
.
toStdString
().
c_str
(),
sizeof
(
read
.
param_id
));
read
.
param_id
[
sizeof
(
read
.
param_id
)
-
1
]
=
'\0'
;
// Enforce null termination
read
.
target_system
=
uasId
;
read
.
target_component
=
component
;
mavlink_msg_param_request_read_encode
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
&
read
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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