Skip to content
Snippets Groups Projects
Commit f19da5cb authored by Don Gagne's avatar Don Gagne
Browse files

Fix unit test for new planned home position behavior
parent ddc06b5a
Branches
No related tags found
No related merge requests found
......@@ -135,9 +135,8 @@ void MissionControllerTest::_testAddWaypointWorker(MAV_AUTOPILOT firmwareType)
QCOMPARE((MAV_CMD)simpleItem->command(), MAV_CMD_NAV_TAKEOFF);
QCOMPARE(simpleItem->childItems()->count(), 0);
// If the first item added specifies a coordinate, then planned home position will be set
bool plannedHomePositionValue = firmwareType == MAV_AUTOPILOT_ARDUPILOTMEGA ? false : true;
QCOMPARE(settingsItem->coordinate().isValid(), plannedHomePositionValue);
// Planned home position should always be set after first item
QVERIFY(settingsItem->coordinate().isValid());
// ArduPilot takeoff command has no coordinate, so should be child item
QCOMPARE(settingsItem->childItems()->count(), firmwareType == MAV_AUTOPILOT_ARDUPILOTMEGA ? 1 : 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment