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
29e114fd
Commit
29e114fd
authored
Apr 28, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1516 from DonLakeFlyer/MockLink
Mock link automatically added to Connect
parents
0306941d
1191018a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
LinkManager.cc
src/comm/LinkManager.cc
+9
-0
MockLink.cc
src/comm/MockLink.cc
+4
-1
No files found.
src/comm/LinkManager.cc
View file @
29e114fd
...
@@ -409,6 +409,15 @@ void LinkManager::loadLinkConfigurationList()
...
@@ -409,6 +409,15 @@ void LinkManager::loadLinkConfigurationList()
}
}
emit
linkConfigurationChanged
();
emit
linkConfigurationChanged
();
}
}
// Debug buids always add MockLink automatically
#ifdef QT_DEBUG
MockConfiguration
*
pMock
=
new
MockConfiguration
(
"Mock Link"
);
pMock
->
setDynamic
(
true
);
addLinkConfiguration
(
pMock
);
emit
linkConfigurationChanged
();
#endif
// Enable automatic PX4 hunting
// Enable automatic PX4 hunting
_configurationsLoaded
=
true
;
_configurationsLoaded
=
true
;
}
}
...
...
src/comm/MockLink.cc
View file @
29e114fd
...
@@ -506,8 +506,11 @@ void MockLink::_handleParamSet(const mavlink_message_t& msg)
...
@@ -506,8 +506,11 @@ void MockLink::_handleParamSet(const mavlink_message_t& msg)
// Param may not be null terminated if exactly fits
// Param may not be null terminated if exactly fits
char
paramId
[
MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN
+
1
];
char
paramId
[
MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN
+
1
];
paramId
[
MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN
]
=
0
;
strncpy
(
paramId
,
request
.
param_id
,
MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN
);
strncpy
(
paramId
,
request
.
param_id
,
MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN
);
qCDebug
(
MockLinkLog
)
<<
"_handleParamSet"
<<
componentId
<<
paramId
<<
request
.
param_type
;
Q_ASSERT
(
_mapParamName2Value
.
contains
(
componentId
));
Q_ASSERT
(
_mapParamName2Value
.
contains
(
componentId
));
Q_ASSERT
(
_mapParamName2Value
[
componentId
].
contains
(
paramId
));
Q_ASSERT
(
_mapParamName2Value
[
componentId
].
contains
(
paramId
));
Q_ASSERT
(
request
.
param_type
==
_mapParamName2MavParamType
[
paramId
]);
Q_ASSERT
(
request
.
param_type
==
_mapParamName2MavParamType
[
paramId
]);
...
...
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