Commit c6f54b28 authored by André's avatar André
parents d38277de 891b0adb
...@@ -32,7 +32,7 @@ FactPanel { ...@@ -32,7 +32,7 @@ FactPanel {
TextInput { TextInput {
text: fact2.value 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 onAccepted: fact2.value = text
} }
......
...@@ -58,8 +58,8 @@ void FactSystemTestBase::_parameter_default_component_id_test(void) ...@@ -58,8 +58,8 @@ void FactSystemTestBase::_parameter_default_component_id_test(void)
void FactSystemTestBase::_parameter_specific_component_id_test(void) void FactSystemTestBase::_parameter_specific_component_id_test(void)
{ {
QVERIFY(_vehicle->parameterManager()->parameterExists(200, "RC_MAP_THROTTLE")); QVERIFY(_vehicle->parameterManager()->parameterExists(MAV_COMP_ID_AUTOPILOT1, "RC_MAP_THROTTLE"));
Fact* fact = _vehicle->parameterManager()->getParameter(200, "RC_MAP_THROTTLE"); Fact* fact = _vehicle->parameterManager()->getParameter(MAV_COMP_ID_AUTOPILOT1, "RC_MAP_THROTTLE");
QVERIFY(fact != NULL); QVERIFY(fact != NULL);
QVariant factValue = fact->rawValue(); QVariant factValue = fact->rawValue();
QCOMPARE(factValue.isValid(), true); QCOMPARE(factValue.isValid(), true);
......
...@@ -599,7 +599,7 @@ void ParameterManager::_waitingParamTimeout(void) ...@@ -599,7 +599,7 @@ void ParameterManager::_waitingParamTimeout(void)
if (!paramsRequested && !_waitingForDefaultComponent && !_mapParameterName2Variant.contains(_vehicle->defaultComponentId())) { if (!paramsRequested && !_waitingForDefaultComponent && !_mapParameterName2Variant.contains(_vehicle->defaultComponentId())) {
// Initial load is complete but we still don't have any default component params. Wait one more cycle to see if the // Initial load is complete but we still don't have any default component params. Wait one more cycle to see if the
// any show up. // any show up.
qCDebug(ParameterManagerLog) << _logVehiclePrefix() << "Restarting _waitingParamTimeoutTimer - still don't have default component params"; qCDebug(ParameterManagerLog) << _logVehiclePrefix() << "Restarting _waitingParamTimeoutTimer - still don't have default component params" << _vehicle->defaultComponentId() << _mapParameterName2Variant.keys();
_waitingParamTimeoutTimer.start(); _waitingParamTimeoutTimer.start();
_waitingForDefaultComponent = true; _waitingForDefaultComponent = true;
return; return;
......
...@@ -74,6 +74,20 @@ void MultiVehicleManager::setToolbox(QGCToolbox *toolbox) ...@@ -74,6 +74,20 @@ void MultiVehicleManager::setToolbox(QGCToolbox *toolbox)
void MultiVehicleManager::_vehicleHeartbeatInfo(LinkInterface* link, int vehicleId, int componentId, int vehicleMavlinkVersion, int vehicleFirmwareType, int vehicleType) 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()) { if (_vehicles.count() > 0 && !qgcApp()->toolbox()->corePlugin()->options()->multiVehicleEnabled()) {
return; return;
} }
......
...@@ -51,7 +51,7 @@ MockLink::MockLink(SharedLinkConfigurationPointer& config) ...@@ -51,7 +51,7 @@ MockLink::MockLink(SharedLinkConfigurationPointer& config)
, _connected(false) , _connected(false)
, _mavlinkChannel(0) , _mavlinkChannel(0)
, _vehicleSystemId(_nextVehicleSystemId++) , _vehicleSystemId(_nextVehicleSystemId++)
, _vehicleComponentId(200) , _vehicleComponentId(MAV_COMP_ID_AUTOPILOT1)
, _inNSH(false) , _inNSH(false)
, _mavlinkStarted(true) , _mavlinkStarted(true)
, _mavBaseMode(MAV_MODE_FLAG_MANUAL_INPUT_ENABLED | MAV_MODE_FLAG_CUSTOM_MODE_ENABLED) , _mavBaseMode(MAV_MODE_FLAG_MANUAL_INPUT_ENABLED | MAV_MODE_FLAG_CUSTOM_MODE_ENABLED)
......
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