Fix a mistake in handling of engine starter property names.
This commit is contained in:
parent
e2875babad
commit
90e4896fdf
1 changed files with 5 additions and 10 deletions
|
@ -103,7 +103,6 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
SGPropertyNode *node;
|
SGPropertyNode *node;
|
||||||
SGPropertyNode *starter;
|
|
||||||
SGPropertyNode *fuelpump;
|
SGPropertyNode *fuelpump;
|
||||||
SGPropertyNode *tempnode;
|
SGPropertyNode *tempnode;
|
||||||
|
|
||||||
|
@ -123,9 +122,12 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
|
||||||
for ( i = 0; i < FGNetCtrls::FG_MAX_ENGINES; ++i ) {
|
for ( i = 0; i < FGNetCtrls::FG_MAX_ENGINES; ++i ) {
|
||||||
// Controls
|
// Controls
|
||||||
node = fgGetNode("/controls/engines/engine", i );
|
node = fgGetNode("/controls/engines/engine", i );
|
||||||
starter = fgGetNode("/systems/electrical/outputs/starter", i );
|
|
||||||
fuelpump = fgGetNode("/systems/electrical/outputs/fuel-pump", 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");
|
tempnode = node->getChild("master-bat");
|
||||||
if ( tempnode != NULL ) {
|
if ( tempnode != NULL ) {
|
||||||
net->master_bat[i] = tempnode->getBoolValue();
|
net->master_bat[i] = tempnode->getBoolValue();
|
||||||
|
@ -154,12 +156,6 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
|
||||||
net->fuel_pump_power[i] = 0.0;
|
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
|
// Faults
|
||||||
SGPropertyNode *faults = node->getChild( "faults", 0, true );
|
SGPropertyNode *faults = node->getChild( "faults", 0, true );
|
||||||
net->engine_ok[i] = faults->getBoolValue( "serviceable", true );
|
net->engine_ok[i] = faults->getBoolValue( "serviceable", true );
|
||||||
|
@ -370,6 +366,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
|
||||||
node->getChild( "condition" )
|
node->getChild( "condition" )
|
||||||
->setDoubleValue( net->condition[i] );
|
->setDoubleValue( net->condition[i] );
|
||||||
node->getChild( "magnetos" )->setDoubleValue( net->magnetos[i] );
|
node->getChild( "magnetos" )->setDoubleValue( net->magnetos[i] );
|
||||||
|
node->getChild( "starter" )->setDoubleValue( net->starter_power[i] );
|
||||||
|
|
||||||
// Faults
|
// Faults
|
||||||
SGPropertyNode *faults = node->getNode( "faults", true );
|
SGPropertyNode *faults = node->getNode( "faults", true );
|
||||||
|
@ -386,8 +383,6 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
|
||||||
|
|
||||||
fgSetBool( "/systems/electrical/outputs/fuel-pump",
|
fgSetBool( "/systems/electrical/outputs/fuel-pump",
|
||||||
net->fuel_pump_power[0] );
|
net->fuel_pump_power[0] );
|
||||||
fgSetBool( "/systems/electrical/outputs/starter",
|
|
||||||
net->starter_power[0] );
|
|
||||||
|
|
||||||
for ( i = 0; i < FGNetCtrls::FG_MAX_TANKS; ++i ) {
|
for ( i = 0; i < FGNetCtrls::FG_MAX_TANKS; ++i ) {
|
||||||
node = fgGetNode( "/controls/fuel/tank", i );
|
node = fgGetNode( "/controls/fuel/tank", i );
|
||||||
|
|
Loading…
Reference in a new issue