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
432a42d4
Commit
432a42d4
authored
Dec 02, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix param crash and connect/disconnect
parent
c8441884
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
MockLink.cc
src/qgcunittest/MockLink.cc
+20
-20
No files found.
src/qgcunittest/MockLink.cc
View file @
432a42d4
...
...
@@ -100,23 +100,24 @@ void MockLink::readBytes(void)
bool
MockLink
::
_connect
(
void
)
{
if
(
!
_connected
)
{
_connected
=
true
;
start
();
emit
connected
();
emit
connected
(
true
);
}
return
true
;
}
bool
MockLink
::
_disconnect
(
void
)
{
if
(
_connected
)
{
_connected
=
false
;
exit
();
emit
disconnected
();
emit
connected
(
false
);
}
return
true
;
}
...
...
@@ -136,9 +137,6 @@ void MockLink::run(void)
_timer50HzTasks
.
start
(
20
);
exec
();
emit
disconnected
();
emit
connected
(
false
);
}
void
MockLink
::
_run1HzTasks
(
void
)
...
...
@@ -382,11 +380,13 @@ void MockLink::_handleParamRequestList(const mavlink_message_t& msg)
for
(
param
=
_parameters
.
begin
();
param
!=
_parameters
.
end
();
param
++
)
{
mavlink_message_t
responseMsg
;
char
paramId
[
MAVLINK_MSG_ID_PARAM_VALUE_LEN
];
strncpy
(
paramId
,
param
.
key
().
toLocal8Bit
().
constData
(),
MAVLINK_MSG_ID_PARAM_VALUE_LEN
);
mavlink_msg_param_value_pack
(
_vehicleSystemId
,
_vehicleComponentId
,
&
responseMsg
,
// Outgoing message
param
.
key
().
toLocal8Bit
().
constData
(),
// Parameter name
param
Id
,
// Parameter name
param
.
value
().
toFloat
(),
// Parameter vluae
MAV_PARAM_TYPE_REAL32
,
// FIXME: Pull from QVariant type
_cParameters
,
// Total number of parameters
...
...
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