Bugfix for DISCON GPS test
Relocate before starting the GPS, to avoid confusion when we teleport
This commit is contained in:
parent
17774dbe4c
commit
492c6daeca
1 changed files with 6 additions and 7 deletions
|
@ -295,20 +295,19 @@ void RouteManagerTests::testSequenceDiscontinuityAndResume()
|
||||||
auto gpsNode = globals->get_props()->getNode("instrumentation/gps", true);
|
auto gpsNode = globals->get_props()->getNode("instrumentation/gps", true);
|
||||||
// auto rmNode = globals->get_props()->getNode("autopilot/route-manager", true);
|
// auto rmNode = globals->get_props()->getNode("autopilot/route-manager", true);
|
||||||
|
|
||||||
|
auto balenLeg = fp1->legAtIndex(2);
|
||||||
|
auto pos = fp1->pointAlongRoute(2, -8.0); // 8nm before BALEN
|
||||||
|
FGTestApi::setPosition(pos);
|
||||||
|
FGTestApi::runForTime(10.0); // let the GPS stabilize
|
||||||
|
|
||||||
CPPUNIT_ASSERT(!strcmp("obs", gpsNode->getStringValue("mode")));
|
CPPUNIT_ASSERT(!strcmp("obs", gpsNode->getStringValue("mode")));
|
||||||
rm->activate();
|
rm->activate();
|
||||||
|
|
||||||
CPPUNIT_ASSERT(fp1->isActive());
|
CPPUNIT_ASSERT(fp1->isActive());
|
||||||
|
|
||||||
auto balenLeg = fp1->legAtIndex(2);
|
CPPUNIT_ASSERT(std::string{"leg"} == gpsNode->getStringValue("mode"));
|
||||||
auto pos = fp1->pointAlongRoute(2, -8.0); // 8nm before BALEN
|
|
||||||
|
|
||||||
|
|
||||||
fp1->setCurrentIndex(2);
|
fp1->setCurrentIndex(2);
|
||||||
|
|
||||||
FGTestApi::setPosition(pos);
|
|
||||||
FGTestApi::runForTime(10.0); // let the GPS stabilize
|
|
||||||
|
|
||||||
auto pilot = SGSharedPtr<FGTestApi::TestPilot>(new FGTestApi::TestPilot);
|
auto pilot = SGSharedPtr<FGTestApi::TestPilot>(new FGTestApi::TestPilot);
|
||||||
pilot->resetAtPosition(pos);
|
pilot->resetAtPosition(pos);
|
||||||
pilot->setCourseTrue(270);
|
pilot->setCourseTrue(270);
|
||||||
|
|
Loading…
Add table
Reference in a new issue