1
0
Fork 0

Fix crashes (activating the route-manager) with a default GPS.

This commit is contained in:
James Turner 2010-08-16 17:10:12 +01:00
parent dbd9935c52
commit ae50c054a9
2 changed files with 2 additions and 1 deletions
src/Instrumentation

View file

@ -332,7 +332,7 @@ GPS::bind()
tie(_gpsNode, "desired-course-deg", SGRawValueMethods<GPS, double> tie(_gpsNode, "desired-course-deg", SGRawValueMethods<GPS, double>
(*this, &GPS::getDesiredCourse, NULL)); (*this, &GPS::getDesiredCourse, NULL));
_desiredCourseNode = _gpsNode->getChild("desired-course-deg"); _desiredCourseNode = _gpsNode->getChild("desired-course-deg", 0, true);
tieSGGeodReadOnly(_gpsNode, _indicated_pos, "indicated-longitude-deg", tieSGGeodReadOnly(_gpsNode, _indicated_pos, "indicated-longitude-deg",
"indicated-latitude-deg", "indicated-altitude-ft"); "indicated-latitude-deg", "indicated-altitude-ft");

View file

@ -92,6 +92,7 @@ void FGInstrumentMgr::init()
SGPropertyNode_ptr nd(new SGPropertyNode); SGPropertyNode_ptr nd(new SGPropertyNode);
nd->setStringValue("name", "gps"); nd->setStringValue("name", "gps");
nd->setIntValue("number", 0); nd->setIntValue("number", 0);
_instruments.push_back("gps[0]");
set_subsystem("gps[0]", new GPS(nd)); set_subsystem("gps[0]", new GPS(nd));
} }