]> git.mxchange.org Git - flightgear.git/commitdiff
Roy Vegard Ovesen:
authorehofman <ehofman>
Sat, 13 Nov 2004 15:00:00 +0000 (15:00 +0000)
committerehofman <ehofman>
Sat, 13 Nov 2004 15:00:00 +0000 (15:00 +0000)
We have decided that hardcoded initialization of instruments and systems is
bad. So we remove them.

Hardcoded initialization is bad because it can't be overridden from config
files or from the command line. We prefer to do it through config files that
should be, eventually, aircraft specific (*-set.xml), not global
(preferences.xml).

17 files changed:
src/Instrumentation/adf.cxx
src/Instrumentation/airspeed_indicator.cxx
src/Instrumentation/altimeter.cxx
src/Instrumentation/attitude_indicator.cxx
src/Instrumentation/clock.cxx
src/Instrumentation/dme.cxx
src/Instrumentation/encoder.cxx
src/Instrumentation/gps.cxx
src/Instrumentation/heading_indicator.cxx
src/Instrumentation/kr_87.cxx
src/Instrumentation/slip_skid_ball.cxx
src/Instrumentation/transponder.cxx
src/Instrumentation/turn_indicator.cxx
src/Instrumentation/vertical_speed_indicator.cxx
src/Systems/pitot.cxx
src/Systems/static.cxx
src/Systems/vacuum.cxx

index d4f646220c520c1b1b3ed13742c6e4a5a4cab971..e5303db019f7673c6668d67c4b757d7de834bd22 100644 (file)
@@ -131,8 +131,6 @@ ADF::init ()
     std::ostringstream temp;
     temp << name << num;
     adf_ident = temp.str();
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void
index dbec719fadea20d10e56d4002db7003bb5080db2..db34f3fce6f70739b3ab29cd504f0307a6167649 100644 (file)
@@ -73,8 +73,6 @@ AirspeedIndicator::init ()
     _static_pressure_node = fgGetNode(static_port.c_str(), true);
     _density_node = fgGetNode("/environment/density-slugft3", true);
     _speed_node = node->getChild("indicated-speed-kt", 0, true);
-
-    _serviceable_node->setBoolValue(true);
 }
 
 #ifndef FPSTOKTS
index 2a82ee7a031f95a659806ee6a64b7935a698a097..5b7e3decc3cc52345386b4cff5325b55b851f3c0 100644 (file)
@@ -100,9 +100,6 @@ Altimeter::init ()
     _setting_node = node->getChild("setting-inhg", 0, true);
     _pressure_node = fgGetNode(static_port.c_str(), true);
     _altitude_node = node->getChild("indicated-altitude-ft", 0, true);
-
-    _serviceable_node->setBoolValue(true);
-    _setting_node->setDoubleValue(29.92);
 }
 
 void
index d958de25df39d361ed4047a391d357221f9a75d2..d57947663a318f2e52a1e6e70a9166133c078808 100644 (file)
@@ -67,8 +67,6 @@ AttitudeIndicator::init ()
     _roll_int_node = node->getChild("internal-roll-deg", 0, true);
     _pitch_out_node = node->getChild("indicated-pitch-deg", 0, true);
     _roll_out_node = node->getChild("indicated-roll-deg", 0, true);
-
-    //_serviceable_node->setBoolValue(true);
 }
 
 void
index b850d18ebd03caceec12fbc425d6578eaf82985f..1b5808fb489139a0d001eaa5b30cd5970049c961 100644 (file)
@@ -66,8 +66,6 @@ Clock::init ()
     _offset_node = node->getChild("offset-sec", 0, true);
     _sec_node = node->getChild("indicated-sec", 0, true);
     _string_node = node->getChild("indicated-string", 0, true);
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void
index 6c4d08d713c0696057b641fe37478df11d6f26a1..7915ea5eb4816324f3dbcb22a0cb2e0d09a5e27c 100644 (file)
@@ -100,8 +100,6 @@ DME::init ()
     _distance_node = node->getChild("indicated-distance-nm", 0, true);
     _speed_node = node->getChild("indicated-ground-speed-kt", 0, true);
     _time_node = node->getChild("indicated-time-min", 0, true);
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void
index 0c1517aecba145b0f32cbf83970d726c475eb1e7..fa01c40eae8db1b8285bc7be0aa9f4a14f7d8403 100644 (file)
@@ -112,8 +112,6 @@ void Encoder::init()
     // Outputs
     pressureAltitudeNode = node->getChild("pressure-alt-ft", 0, true);
     modeCAltitudeNode = node->getChild("mode-c-alt-ft", 0, true);
-    // Init
-    serviceableNode->setBoolValue(true);
 }
 
 
index 5ebfafcba95302d24d871a30da6c1e012e17acbe..b8dcb6d58d58c0a76c2e3c89125ec6eed7df7864 100644 (file)
@@ -692,6 +692,7 @@ GPS::update (double delta_time_sec)
             popWp->setBoolValue(false);
 
             route->delete_first();
+           _route->removeChild("Waypoint", 0, false);
         }
 
     } else {
index 8878e3ba13c79f25f311a3fb33d4a1478fbe10aa..9c2877cf2d84d35bb0f4ad4a1692e1633757aabd 100644 (file)
@@ -56,8 +56,6 @@ HeadingIndicator::init ()
     _heading_out_node = node->getChild("indicated-heading-deg", 0, true);
     _last_heading_deg = (_heading_in_node->getDoubleValue() +
                          _offset_node->getDoubleValue());
-
-    //_serviceable_node->setBoolValue(true);
 }
 
 void
index d0c81c8bac4cf18a99be107a83b2d1e05e66a0c1..58e358d7a2c2a980973958e772849594b40d64ab 100644 (file)
@@ -114,7 +114,6 @@ FGKR_87::~FGKR_87() {
 
 
 void FGKR_87::init () {
-    serviceable->setBoolValue( true );
     morse.init();
 }
 
index ba470bd1c3d8a7eab8806c5ad8a345ffbb19a9fd..8b79f4f63cac6d59450c209bfa09e2bc3b4e566c 100644 (file)
@@ -51,8 +51,6 @@ SlipSkidBall::init ()
     _z_accel_node = fgGetNode("/accelerations/pilot/z-accel-fps_sec", true);
     _out_node = node->getChild("indicated-slip-skid", 0, true);
     _override_node = node->getChild("iverride", 0, true);
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void
index 882bd160aeb8568c34262e693c69aa54012594d0..a3b62f510a89fb085569901f1a87915a26f97bce 100644 (file)
@@ -71,8 +71,6 @@ void Transponder::init()
     // Outputs
     idCodeNode = node->getChild("id-code", 0, true);
     flightLevelNode = node->getChild("flight-level", 0, true);
-    // Init
-    serviceableNode->setBoolValue(true);
 }
 
 
index 6eab60a491000987514f2894e9e1de3fccd5b0ba..2a45657901073f6638f05f8a4cc301e7a88ba8a5 100644 (file)
@@ -57,9 +57,6 @@ TurnIndicator::init ()
     _electric_current_node = 
         fgGetNode("/systems/electrical/outputs/turn-coordinator", true);
     _rate_out_node = node->getChild("indicated-turn-rate", 0, true);
-
-    //_serviceable_node->setBoolValue(true);
-    
 }
 
 void
index fb2924600f738f27f832dacf9491252aea023a11..2188637e077ae76ab4c4eb81b3894038f2665c1a 100644 (file)
@@ -57,7 +57,6 @@ VerticalSpeedIndicator::init ()
     _pressure_node = fgGetNode(static_port.c_str(), true);
     _speed_node = node->getChild("indicated-speed-fpm", 0, true);
 
-    _serviceable_node->setBoolValue(true);
                                 // Initialize at ambient pressure
     _internal_pressure_inhg = _pressure_node->getDoubleValue();
 }
index 7201e4f5dbee7b8d52279ac4026f3c6b3aea3ed3..3851f53fd3c4471b86b9b0da0526145a01475ee5 100644 (file)
@@ -54,8 +54,6 @@ PitotSystem::init ()
     _density_node = fgGetNode("/environment/density-slugft3", true);
     _velocity_node = fgGetNode("/velocities/airspeed-kt", true);
     _total_pressure_node = node->getChild("total-pressure-inhg", 0, true);
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void
index 59111d32233a4c4e3d6903748c1920867e31a710..f6cfa47b4be31831e46fd551bdc171a02baff1fe 100644 (file)
@@ -51,8 +51,6 @@ StaticSystem::init ()
     _serviceable_node = node->getChild("serviceable", 0, true);
     _pressure_in_node = fgGetNode("/environment/pressure-inhg", true);
     _pressure_out_node = node->getChild("pressure-inhg", 0, true);
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void
index fcf80d5c31838a8b15e7d98a7186fcb453276b9c..256e6efaff80c07a9290f13df02126a39fe84861 100644 (file)
@@ -60,8 +60,6 @@ VacuumSystem::init()
     _rpm_node = fgGetNode(rpm.c_str(), true);
     _pressure_node = fgGetNode("/environment/pressure-inhg", true);
     _suction_node = node->getChild("suction-inhg", 0, true);
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void