Skip to content

Commit

Permalink
Fix up MockLink and unit tests for correct component id
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Jun 29, 2017
1 parent b7d3377 commit 7485b7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/FactSystem/FactSystemTest.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions src/FactSystem/FactSystemTestBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/comm/MockLink.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7485b7a

Please sign in to comment.