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:
parent
ea40f3d424
commit
c0d347859f
1 changed files with 9 additions and 0 deletions
|
@ -418,10 +418,19 @@ FGProperties::bind ()
|
||||||
_tiedProperties.Tie<const char*>("/position/longitude-string", getLongitudeString);
|
_tiedProperties.Tie<const char*>("/position/longitude-string", getLongitudeString);
|
||||||
|
|
||||||
_headingMagnetic = fgGetNode("/orientation/heading-magnetic-deg", true);
|
_headingMagnetic = fgGetNode("/orientation/heading-magnetic-deg", true);
|
||||||
|
_headingMagnetic->setDoubleValue(0.0);
|
||||||
|
|
||||||
_trackMagnetic = fgGetNode("/orientation/track-magnetic-deg", true);
|
_trackMagnetic = fgGetNode("/orientation/track-magnetic-deg", true);
|
||||||
|
_trackMagnetic->setDoubleValue(0.0);
|
||||||
|
|
||||||
_magVar = fgGetNode("/environment/magnetic-variation-deg", true);
|
_magVar = fgGetNode("/environment/magnetic-variation-deg", true);
|
||||||
|
_magVar->setDoubleValue(0.0);
|
||||||
|
|
||||||
_trueHeading = fgGetNode("/orientation/heading-deg", true);
|
_trueHeading = fgGetNode("/orientation/heading-deg", true);
|
||||||
|
_trueHeading->setDoubleValue(0.0);
|
||||||
|
|
||||||
_trueTrack = fgGetNode("/orientation/track-deg", true);
|
_trueTrack = fgGetNode("/orientation/track-deg", true);
|
||||||
|
_trueTrack->setDoubleValue(0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue