]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/instrument_mgr.cxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / Instrumentation / instrument_mgr.cxx
index f330856e9d7cce7962086ac974bf17f89a678c50..2e927f8d8db5957ab85d4e2da9adcd46d7c90970 100644 (file)
@@ -5,50 +5,35 @@
 
 
 #include "instrument_mgr.hxx"
+#include "airspeed_indicator.hxx"
 #include "attitude_indicator.hxx"
+#include "altimeter.hxx"
+#include "turn_indicator.hxx"
+#include "slip_skid_ball.hxx"
+#include "heading_indicator.hxx"
+#include "vertical_speed_indicator.hxx"
+#include "mag_compass.hxx"
+
+#include "dme.hxx"
+#include "gps.hxx"
 
 
 FGInstrumentMgr::FGInstrumentMgr ()
 {
-    // NO-OP
+    set_subsystem("asi", new AirspeedIndicator);
+    set_subsystem("ai", new AttitudeIndicator);
+    set_subsystem("alt", new Altimeter);
+    set_subsystem("ti", new TurnIndicator);
+    set_subsystem("ball", new SlipSkidBall);
+    set_subsystem("hi", new HeadingIndicator);
+    set_subsystem("vsi", new VerticalSpeedIndicator);
+    set_subsystem("compass", new MagCompass);
+    set_subsystem("dme", new DME, 1.0);
+    set_subsystem("gps", new GPS, 0.45);
 }
 
 FGInstrumentMgr::~FGInstrumentMgr ()
 {
-    for (unsigned int i = 0; i < _instruments.size(); i++) {
-        delete _instruments[i];
-        _instruments[i] = 0;
-    }
-}
-
-void
-FGInstrumentMgr::init ()
-{
-                                // TODO: replace with XML configuration
-    _instruments.push_back(new AttitudeIndicator);
-
-                                // Initialize the individual instruments
-    for (unsigned int i = 0; i < _instruments.size(); i++)
-        _instruments[i]->init();
-}
-
-void
-FGInstrumentMgr::bind ()
-{
-    // NO-OP
-}
-
-void
-FGInstrumentMgr::unbind ()
-{
-    // NO-OP
-}
-
-void
-FGInstrumentMgr::update (double dt)
-{
-    for (unsigned int i = 0; i < _instruments.size(); i++)
-        _instruments[i]->update(dt);
 }
 
 // end of instrument_manager.cxx