1
0
Fork 0

Fix a mistake in handling of engine starter property names.

This commit is contained in:
curt 2005-01-03 03:20:31 +00:00
parent e2875babad
commit 90e4896fdf

View file

@ -103,7 +103,6 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
{
int i;
SGPropertyNode *node;
SGPropertyNode *starter;
SGPropertyNode *fuelpump;
SGPropertyNode *tempnode;
@ -123,9 +122,12 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
for ( i = 0; i < FGNetCtrls::FG_MAX_ENGINES; ++i ) {
// Controls
node = fgGetNode("/controls/engines/engine", i );
starter = fgGetNode("/systems/electrical/outputs/starter", i );
fuelpump = fgGetNode("/systems/electrical/outputs/fuel-pump", i );
tempnode = node->getChild("starter");
if ( tempnode != NULL ) {
net->starter_power[i] = ( tempnode->getDoubleValue() >= 1.0 );
}
tempnode = node->getChild("master-bat");
if ( tempnode != NULL ) {
net->master_bat[i] = tempnode->getBoolValue();
@ -154,12 +156,6 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
net->fuel_pump_power[i] = 0.0;
}
if ( starter != NULL ) {
net->starter_power[i] = ( starter->getDoubleValue() >= 1.0 );
} else {
net->starter_power[i] = 0.0;
}
// Faults
SGPropertyNode *faults = node->getChild( "faults", 0, true );
net->engine_ok[i] = faults->getBoolValue( "serviceable", true );
@ -370,6 +366,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
node->getChild( "condition" )
->setDoubleValue( net->condition[i] );
node->getChild( "magnetos" )->setDoubleValue( net->magnetos[i] );
node->getChild( "starter" )->setDoubleValue( net->starter_power[i] );
// Faults
SGPropertyNode *faults = node->getNode( "faults", true );
@ -386,8 +383,6 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
fgSetBool( "/systems/electrical/outputs/fuel-pump",
net->fuel_pump_power[0] );
fgSetBool( "/systems/electrical/outputs/starter",
net->starter_power[0] );
for ( i = 0; i < FGNetCtrls::FG_MAX_TANKS; ++i ) {
node = fgGetNode( "/controls/fuel/tank", i );