From 88f6b4e23b0b12a1a851326758da641e447ae387 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 26 May 2004 18:13:34 +0000 Subject: [PATCH] Add simple icing state. --- src/Network/native_ctrls.cxx | 7 +++++++ src/Network/net_ctrls.hxx | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index 10e78028b..3c1d021e5 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -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 ) { diff --git a/src/Network/net_ctrls.hxx b/src/Network/net_ctrls.hxx index 31f21cb51..cd14d7e1b 100644 --- a/src/Network/net_ctrls.hxx +++ b/src/Network/net_ctrls.hxx @@ -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