X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fattitude_indicator.cxx;h=de79e811df38e939f610c9b55d92569a0abb743f;hb=68c71d5787f2a0309e35c3e05939950113618cb7;hp=54e7f24fc7269f02c8d2e251808ebfd90c252b0b;hpb=a6db6d89ff41a619569e6433409e8bf62ff98499;p=flightgear.git diff --git a/src/Instrumentation/attitude_indicator.cxx b/src/Instrumentation/attitude_indicator.cxx index 54e7f24fc..de79e811d 100644 --- a/src/Instrumentation/attitude_indicator.cxx +++ b/src/Instrumentation/attitude_indicator.cxx @@ -6,6 +6,10 @@ // TODO: // - better spin-up +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include #include @@ -18,6 +22,7 @@ #include
#include
+using std::string; AttitudeIndicator::AttitudeIndicator ( SGPropertyNode *node ) : @@ -60,6 +65,16 @@ AttitudeIndicator::init () _roll_int_node = node->getChild("internal-roll-deg", 0, true); _pitch_out_node = node->getChild("indicated-pitch-deg", 0, true); _roll_out_node = node->getChild("indicated-roll-deg", 0, true); + + reinit(); +} + +void +AttitudeIndicator::reinit () +{ + _roll_int_node->setDoubleValue(0.0); + _pitch_int_node->setDoubleValue(0.0); + _gyro.reinit(); } void