Skip to content

Commit

Permalink
SendMavCommandWithSignallingTest.cc: ignore MAV_CMD_REQUEST_MESSAGE:
Browse files Browse the repository at this point in the history
gimbal controller sends some message requests when receiving a
hearbeat, and the cmd results collide with this test, so we filter
out MAV_CMD_REQUEST_MESSAGE from gimbal controller
  • Loading branch information
Davidsastresas authored and julianoes committed Apr 11, 2024
1 parent 7f6a912 commit 00fbb1a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Vehicle/SendMavCommandWithSignallingTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ void SendMavCommandWithSignallingTest::_testCaseWorker(TestCase_t& testCase)

QCOMPARE(spyResult.wait(10000), true);
QList<QVariant> arguments = spyResult.takeFirst();

// Gimbal controler requests MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION on vehicle connection,
// and that messes with this test, as it receives response to that command instead. So if we
// are taking the response to that MAV_CMD_REQUEST_MESSAGE, we discard it and take the next
while (arguments.at(2).toInt() == MAV_CMD_REQUEST_MESSAGE) {
qDebug() << "Received response to MAV_CMD_REQUEST_MESSAGE(512), ignoring, waiting for: " << testCase.command;
QCOMPARE(spyResult.wait(10000), true);
arguments = spyResult.takeFirst();
}

QCOMPARE(arguments.count(), 5);
QCOMPARE(arguments.at(0).toInt(), vehicle->id());
QCOMPARE(arguments.at(1).toInt(), MAV_COMP_ID_AUTOPILOT1);
Expand Down

0 comments on commit 00fbb1a

Please sign in to comment.