]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/instrument_mgr.cxx
Make the AI models a bit more intelligent. The Gear should be extended and retracted...
[flightgear.git] / src / Instrumentation / instrument_mgr.cxx
index 765c487158852c8ba9cbf1d1d3b1547ab5a8d807..b9f4c359b845be2f1ba083e8d9b50f379b89c94c 100644 (file)
@@ -5,56 +5,41 @@
 
 
 #include "instrument_mgr.hxx"
-#include "altimeter.hxx"
+#include "airspeed_indicator.hxx"
+#include "annunciator.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 "adf.hxx"
+#include "gps.hxx"
+#include "clock.hxx"
 
 
 FGInstrumentMgr::FGInstrumentMgr ()
 {
-    // NO-OP
+    set_subsystem("asi", new AirspeedIndicator);
+    set_subsystem("annunciator", new Annunciator);
+    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("adf", new ADF, 0.15);
+    set_subsystem("gps", new GPS, 0.45);
+    set_subsystem("clock", new Clock, 0.25);
 }
 
 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 Altimeter);
-    _instruments.push_back(new AttitudeIndicator);
-    _instruments.push_back(new HeadingIndicator);
-    _instruments.push_back(new VerticalSpeedIndicator);
-
-                                // 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