_explicitGps(false)
{
set_subsystem("od_gauge", new FGODGauge);
- set_subsystem("hud", new HUD);
+
+ globals->add_subsystem("hud", new HUD, SGSubsystemMgr::DISPLAY);
}
FGInstrumentMgr::~FGInstrumentMgr ()
SGPropertyNode_ptr nd(new SGPropertyNode);
nd->setStringValue("name", "gps");
nd->setIntValue("number", 0);
+ _instruments.push_back("gps[0]");
set_subsystem("gps[0]", new GPS(nd));
}
+ // bind() created instruments before init.
+ for (unsigned int i=0; i<_instruments.size(); ++i) {
+ const std::string& nm(_instruments[i]);
+ SGSubsystem* instr = get_subsystem(nm);
+ instr->bind();
+ }
+
SGSubsystemGroup::init();
}