1
0
Fork 0

Ensure various properties have a value on start.

Ensure /orientation/heading-magnetic-deg, etc have a type of double
immediately. Showed up as a bug in the SenecaII, since the property
is created but has NIL value until the first update() call.
This commit is contained in:
James Turner 2020-05-31 12:18:07 +01:00
parent ea40f3d424
commit c0d347859f

View file

@ -418,10 +418,19 @@ FGProperties::bind ()
_tiedProperties.Tie<const char*>("/position/longitude-string", getLongitudeString);
_headingMagnetic = fgGetNode("/orientation/heading-magnetic-deg", true);
_headingMagnetic->setDoubleValue(0.0);
_trackMagnetic = fgGetNode("/orientation/track-magnetic-deg", true);
_trackMagnetic->setDoubleValue(0.0);
_magVar = fgGetNode("/environment/magnetic-variation-deg", true);
_magVar->setDoubleValue(0.0);
_trueHeading = fgGetNode("/orientation/heading-deg", true);
_trueHeading->setDoubleValue(0.0);
_trueTrack = fgGetNode("/orientation/track-deg", true);
_trueTrack->setDoubleValue(0.0);
}
void