Add simple icing state.
This commit is contained in:
parent
d777d035a9
commit
88f6b4e23b
2 changed files with 13 additions and 1 deletions
|
@ -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 ) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue