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
5c5bbea1
Commit
5c5bbea1
authored
Jun 29, 2017
by
Don Gagne
Committed by
GitHub
Jun 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5362 from DonLakeFlyer/CreateVehicle
Create vehicles only for autopilot component
parents
85183ba1
7485b7a7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
+18
-4
FactSystemTest.qml
src/FactSystem/FactSystemTest.qml
+1
-1
FactSystemTestBase.cc
src/FactSystem/FactSystemTestBase.cc
+2
-2
MultiVehicleManager.cc
src/Vehicle/MultiVehicleManager.cc
+14
-0
MockLink.cc
src/comm/MockLink.cc
+1
-1
No files found.
src/FactSystem/FactSystemTest.qml
View file @
5c5bbea1
...
...
@@ -32,7 +32,7 @@ FactPanel {
TextInput
{
text
:
fact2
.
value
property
Fact
fact2
:
controller
.
getParameterFact
(
200
,
"
RC_MAP_THROTTLE
"
)
property
Fact
fact2
:
controller
.
getParameterFact
(
1
,
"
RC_MAP_THROTTLE
"
)
onAccepted
:
fact2
.
value
=
text
}
...
...
src/FactSystem/FactSystemTestBase.cc
View file @
5c5bbea1
...
...
@@ -58,8 +58,8 @@ void FactSystemTestBase::_parameter_default_component_id_test(void)
void
FactSystemTestBase
::
_parameter_specific_component_id_test
(
void
)
{
QVERIFY
(
_vehicle
->
parameterManager
()
->
parameterExists
(
200
,
"RC_MAP_THROTTLE"
));
Fact
*
fact
=
_vehicle
->
parameterManager
()
->
getParameter
(
200
,
"RC_MAP_THROTTLE"
);
QVERIFY
(
_vehicle
->
parameterManager
()
->
parameterExists
(
MAV_COMP_ID_AUTOPILOT1
,
"RC_MAP_THROTTLE"
));
Fact
*
fact
=
_vehicle
->
parameterManager
()
->
getParameter
(
MAV_COMP_ID_AUTOPILOT1
,
"RC_MAP_THROTTLE"
);
QVERIFY
(
fact
!=
NULL
);
QVariant
factValue
=
fact
->
rawValue
();
QCOMPARE
(
factValue
.
isValid
(),
true
);
...
...
src/Vehicle/MultiVehicleManager.cc
View file @
5c5bbea1
...
...
@@ -74,6 +74,20 @@ void MultiVehicleManager::setToolbox(QGCToolbox *toolbox)
void
MultiVehicleManager
::
_vehicleHeartbeatInfo
(
LinkInterface
*
link
,
int
vehicleId
,
int
componentId
,
int
vehicleMavlinkVersion
,
int
vehicleFirmwareType
,
int
vehicleType
)
{
if
(
componentId
!=
MAV_COMP_ID_AUTOPILOT1
)
{
// Don't create vehicles for components other than the autopilot
if
(
!
getVehicleById
(
vehicleId
))
{
qCDebug
(
MultiVehicleManagerLog
())
<<
"Ignoring heartbeat from unknown component "
<<
link
->
getName
()
<<
vehicleId
<<
componentId
<<
vehicleMavlinkVersion
<<
vehicleFirmwareType
<<
vehicleType
;
}
return
;
}
if
(
_vehicles
.
count
()
>
0
&&
!
qgcApp
()
->
toolbox
()
->
corePlugin
()
->
options
()
->
multiVehicleEnabled
())
{
return
;
}
...
...
src/comm/MockLink.cc
View file @
5c5bbea1
...
...
@@ -51,7 +51,7 @@ MockLink::MockLink(SharedLinkConfigurationPointer& config)
,
_connected
(
false
)
,
_mavlinkChannel
(
0
)
,
_vehicleSystemId
(
_nextVehicleSystemId
++
)
,
_vehicleComponentId
(
200
)
,
_vehicleComponentId
(
MAV_COMP_ID_AUTOPILOT1
)
,
_inNSH
(
false
)
,
_mavlinkStarted
(
true
)
,
_mavBaseMode
(
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
|
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED
)
...
...
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