1
0
Fork 0

Roy Vegard Ovesen:

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).
This commit is contained in:
ehofman 2004-11-13 15:00:00 +00:00
parent 2df4a3b685
commit 2c72f13163
17 changed files with 1 additions and 32 deletions

View file

@ -131,8 +131,6 @@ ADF::init ()
std::ostringstream temp;
temp << name << num;
adf_ident = temp.str();
_serviceable_node->setBoolValue(true);
}
void

View 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

View 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

View 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

View 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

View 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

View 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);
}

View file

@ -692,6 +692,7 @@ GPS::update (double delta_time_sec)
popWp->setBoolValue(false);
route->delete_first();
_route->removeChild("Waypoint", 0, false);
}
} else {

View 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

View file

@ -114,7 +114,6 @@ FGKR_87::~FGKR_87() {
void FGKR_87::init () {
serviceable->setBoolValue( true );
morse.init();
}

View 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

View 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);
}

View 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

View 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();
}

View 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

View 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

View 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