1
0
Fork 0

Add simple icing state.

This commit is contained in:
curt 2004-05-26 18:13:34 +00:00
parent d777d035a9
commit 88f6b4e23b
2 changed files with 13 additions and 1 deletions

View file

@ -210,6 +210,9 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
// the user is switching views. // the user is switching views.
net->hground = cur_fdm_state->get_ground_elev_ft() * SG_FEET_TO_METER; net->hground = cur_fdm_state->get_ground_elev_ft() * SG_FEET_TO_METER;
net->magvar = fgGetDouble("/environment/magnetic-variation-deg"); net->magvar = fgGetDouble("/environment/magnetic-variation-deg");
net->icing = fgGetDouble("/hazards/icing/wing");
net->speedup = fgGetInt("/sim/speed-up"); net->speedup = fgGetInt("/sim/speed-up");
net->freeze = 0; net->freeze = 0;
if ( honor_freezes ) { if ( honor_freezes ) {
@ -267,6 +270,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes,
htond(net->press_inhg); htond(net->press_inhg);
htond(net->hground); htond(net->hground);
htond(net->magvar); htond(net->magvar);
net->icing = htonl(net->icing);
net->speedup = htonl(net->speedup); net->speedup = htonl(net->speedup);
net->freeze = htonl(net->freeze); net->freeze = htonl(net->freeze);
} }
@ -324,6 +328,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
htond(net->press_inhg); htond(net->press_inhg);
htond(net->hground); htond(net->hground);
htond(net->magvar); htond(net->magvar);
net->icing = htonl(net->icing);
net->speedup = htonl(net->speedup); net->speedup = htonl(net->speedup);
net->freeze = htonl(net->freeze); net->freeze = htonl(net->freeze);
} }
@ -404,6 +409,8 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
// ground elevation ??? // ground elevation ???
fgSetDouble("/hazards/icing/wing", net->icing);
fgSetInt( "/sim/speed-up", net->speedup ); fgSetInt( "/sim/speed-up", net->speedup );
if ( honor_freezes ) { if ( honor_freezes ) {

View file

@ -16,7 +16,7 @@
# error This library requires C++ # error This library requires C++
#endif #endif
const int FG_NET_CTRLS_VERSION = 20; const int FG_NET_CTRLS_VERSION = 21;
// Define a structure containing the control parameters // Define a structure containing the control parameters
@ -91,6 +91,11 @@ public:
double hground; // ground elevation (meters) double hground; // ground elevation (meters)
double magvar; // local magnetic variation in degs. 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 // simulation control
int speedup; // integer speedup multiplier int speedup; // integer speedup multiplier
int freeze; // 0=normal int freeze; // 0=normal