Commit b7d3377f authored by DonLakeFlyer's avatar DonLakeFlyer

Create vehicles only for autopilot component

parent 85183ba1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment