]> git.mxchange.org Git - flightgear.git/commitdiff
Add simple icing state.
authorcurt <curt>
Wed, 26 May 2004 18:13:34 +0000 (18:13 +0000)
committercurt <curt>
Wed, 26 May 2004 18:13:34 +0000 (18:13 +0000)
src/Network/native_ctrls.cxx
src/Network/net_ctrls.hxx

index 10e78028b10ce106df847803fcd21b8f27bc3ca4..3c1d021e56f9a96a44add5b5e088f15bea9cf595 100644 (file)
@@ -210,6 +210,9 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
     // the user is switching views.
     net->hground = cur_fdm_state->get_ground_elev_ft() * SG_FEET_TO_METER;
     net->magvar = fgGetDouble("/environment/magnetic-variation-deg");
+
+    net->icing = fgGetDouble("/hazards/icing/wing");
+
     net->speedup = fgGetInt("/sim/speed-up");
     net->freeze = 0;
     if ( honor_freezes ) {
@@ -267,6 +270,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
         htond(net->press_inhg);
        htond(net->hground);
         htond(net->magvar);
+        net->icing = htonl(net->icing);
         net->speedup = htonl(net->speedup);
         net->freeze = htonl(net->freeze);
     }
@@ -324,6 +328,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
         htond(net->press_inhg);
         htond(net->hground);
         htond(net->magvar);
+        net->icing = htonl(net->icing);
         net->speedup = htonl(net->speedup);
         net->freeze = htonl(net->freeze);
     }
@@ -404,6 +409,8 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
 
     // ground elevation ???
 
+    fgSetDouble("/hazards/icing/wing", net->icing);
+
     fgSetInt( "/sim/speed-up", net->speedup );
 
     if ( honor_freezes ) {
index 31f21cb51a845da70f603cd74d2a5f6cf7cf19c4..cd14d7e1b1ae71f1a9a74d4188016f17eae394e3 100644 (file)
@@ -16,7 +16,7 @@
 # error This library requires C++
 #endif                                   
 
-const int FG_NET_CTRLS_VERSION = 20;
+const int FG_NET_CTRLS_VERSION = 21;
 
 
 // Define a structure containing the control parameters
@@ -91,6 +91,11 @@ public:
     double hground;                     // ground elevation (meters)
     double magvar;                      // local magnetic variation in degs.
 
+    // hazards
+    bool icing;                          // icing status could me much
+                                         // more complex but I'm
+                                         // starting simple here.
+
     // simulation control
     int speedup;                        // integer speedup multiplier
     int freeze;                                 // 0=normal