From d53b005a410687e152e2ecd5bf90a80f83d2715b Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 25 Sep 2002 22:08:43 +0000 Subject: [PATCH] Interchange state of fuel_pump (switches) and master switches (bat, alt, and avionics.) --- src/FDM/ExternalNet.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/FDM/ExternalNet.cxx b/src/FDM/ExternalNet.cxx index 949af690b..66915f042 100644 --- a/src/FDM/ExternalNet.cxx +++ b/src/FDM/ExternalNet.cxx @@ -77,6 +77,7 @@ static void global2raw( FGRawCtrls *raw ) { for ( i = 0; i < FGRawCtrls::FG_MAX_ENGINES; ++i ) { raw->throttle[i] = node->getDoubleValue( "throttle", 0.0 ); raw->mixture[i] = node->getDoubleValue( "mixture", 0.0 ); + raw->fuel_pump[i] = node->getDoubleValue( "fuel-pump", false ); raw->prop_advance[i] = node->getDoubleValue( "propeller-pitch", 0.0 ); raw->magnetos[i] = node->getIntValue( "magnetos", 0 ); if ( i == 0 ) { @@ -106,6 +107,12 @@ static void global2raw( FGRawCtrls *raw ) { raw->brake[i] = 0.0; } } + + node = fgGetNode("/controls/switches", true); + raw->master_bat = node->getChild("master-bat")->getBoolValue(); + raw->master_alt = node->getChild("master-alt")->getBoolValue(); + raw->master_avionics = node->getChild("master-avionics")->getBoolValue(); + raw->hground = fgGetDouble( "/environment/ground-elevation-m" ); raw->magvar = fgGetDouble("/environment/magnetic-variation-deg"); raw->speedup = fgGetInt("/sim/speed-up"); @@ -120,6 +127,7 @@ static void global2raw( FGRawCtrls *raw ) { for ( i = 0; i < FGRawCtrls::FG_MAX_ENGINES; ++i ) { htond(raw->throttle[i]); htond(raw->mixture[i]); + raw->fuel_pump[i] = htonl(raw->fuel_pump[i]); htond(raw->prop_advance[i]); raw->magnetos[i] = htonl(raw->magnetos[i]); raw->starter[i] = htonl(raw->starter[i]); @@ -133,6 +141,10 @@ static void global2raw( FGRawCtrls *raw ) { htond(raw->brake[i]); } raw->num_wheels = htonl(raw->num_wheels); + raw->gear_handle = htonl(raw->gear_handle); + raw->master_bat = htonl(raw->master_bat); + raw->master_alt = htonl(raw->master_alt); + raw->master_avionics = htonl(raw->master_avionics); htond(raw->hground); htond(raw->magvar); raw->speedup = htonl(raw->speedup); -- 2.39.2