]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/turn_indicator.cxx
Reset: work with threaded OSG modes
[flightgear.git] / src / Instrumentation / turn_indicator.cxx
index 973b4054aad99d6f46df5edf915ace15cf5f8536..06fd868e2ba8f313b10b35efe54f581fd64c74b6 100644 (file)
@@ -3,6 +3,10 @@
 //
 // This file is in the Public Domain and comes with no warranty.
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <simgear/compiler.h>
 #include <iostream>
 #include <string>
@@ -12,6 +16,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
 
+using std::string;
 
 // Use a bigger number to be more responsive, or a smaller number
 // to be more sluggish.
@@ -41,6 +46,15 @@ TurnIndicator::init ()
     _electric_current_node = 
         fgGetNode("/systems/electrical/outputs/turn-coordinator", true);
     _rate_out_node = node->getChild("indicated-turn-rate", 0, true);
+
+    reinit();
+}
+
+void
+TurnIndicator::reinit ()
+{
+    _last_rate = 0;
+    _gyro.reinit();
 }
 
 void