]> git.mxchange.org Git - flightgear.git/commitdiff
Add condition lever (for turbo props) to FGNetCtrls class.
authorcurt <curt>
Fri, 6 Aug 2004 18:09:23 +0000 (18:09 +0000)
committercurt <curt>
Fri, 6 Aug 2004 18:09:23 +0000 (18:09 +0000)
src/Network/native_ctrls.cxx
src/Network/net_ctrls.hxx

index 3c1d021e56f9a96a44add5b5e088f15bea9cf595..c8453e1f89f77ee312da1ce07c72c1ca2b13bfae 100644 (file)
@@ -138,6 +138,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
         net->throttle[i] = node->getDoubleValue( "throttle", 0.0 );
        net->mixture[i] = node->getDoubleValue( "mixture", 0.0 );
        net->prop_advance[i] = node->getDoubleValue( "propeller-pitch", 0.0 );
+       net->condition[i] = node->getDoubleValue( "condition", 0.0 );
        net->magnetos[i] = node->getIntValue( "magnetos", 0 );
        if ( i == 0 ) {
          // cout << "Magnetos -> " << node->getIntValue( "magnetos", 0 );
@@ -246,6 +247,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
             htond(net->mixture[i]);
             net->fuel_pump_power[i] = htonl(net->fuel_pump_power[i]);
             htond(net->prop_advance[i]);
+            htond(net->condition[i]);
            net->engine_ok[i] = htonl(net->engine_ok[i]);
            net->mag_left_ok[i] = htonl(net->mag_left_ok[i]);
            net->mag_right_ok[i] = htonl(net->mag_right_ok[i]);
@@ -305,6 +307,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
             htond(net->mixture[i]);
             net->fuel_pump_power[i] = htonl(net->fuel_pump_power[i]);
             htond(net->prop_advance[i]);
+            htond(net->condition[i]);
            net->engine_ok[i] = htonl(net->engine_ok[i]);
            net->mag_left_ok[i] = htonl(net->mag_left_ok[i]);
            net->mag_right_ok[i] = htonl(net->mag_right_ok[i]);
@@ -356,6 +359,8 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
         node->getChild( "mixture" )->setDoubleValue( net->mixture[i] );
         node->getChild( "propeller-pitch" )
             ->setDoubleValue( net->prop_advance[i] );
+        node->getChild( "condition" )
+            ->setDoubleValue( net->condition[i] );
         node->getChild( "magnetos" )->setDoubleValue( net->magnetos[i] );
 
        // Faults
index cd14d7e1b1ae71f1a9a74d4188016f17eae394e3..cc6ae5af9e3b4d0490c138e28f6ba224c8c1b112 100644 (file)
@@ -16,7 +16,7 @@
 # error This library requires C++
 #endif                                   
 
-const int FG_NET_CTRLS_VERSION = 21;
+const int FG_NET_CTRLS_VERSION = 22;
 
 
 // Define a structure containing the control parameters
@@ -52,6 +52,7 @@ public:
     bool starter_power[FG_MAX_ENGINES];  // true = starter power
     double throttle[FG_MAX_ENGINES];     //  0 ... 1
     double mixture[FG_MAX_ENGINES];      //  0 ... 1
+    double condition[FG_MAX_ENGINES];    //  0 ... 1
     bool fuel_pump_power[FG_MAX_ENGINES];// true = on
     double prop_advance[FG_MAX_ENGINES]; //  0 ... 1