]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/altimeter.cxx
Changes by Roy Ovesen to begin migrating the avionics out of the Cockpit
[flightgear.git] / src / Instrumentation / altimeter.cxx
index 39a0c105dce9c26a611138c8f0051429f4ca597c..5b7e3decc3cc52345386b4cff5325b55b851f3c0 100644 (file)
@@ -51,11 +51,10 @@ Altimeter::Altimeter ( SGPropertyNode *node )
       num(0),
       static_port("/systems/static")
 {
-
-    for (int i = 0; altitude_data[i][0] != -1; i++)
+    int i;
+    for (i = 0; altitude_data[i][0] != -1; i++)
         _altitude_table->addEntry(altitude_data[i][0], altitude_data[i][1]);
 
-    int i;
     for ( i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);
         string cname = child->getName();
@@ -67,9 +66,9 @@ Altimeter::Altimeter ( SGPropertyNode *node )
         } else if ( cname == "static-port" ) {
             static_port = cval;
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in altimeter config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in altimeter config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
@@ -101,9 +100,6 @@ Altimeter::init ()
     _setting_node = node->getChild("setting-inhg", 0, true);
     _pressure_node = fgGetNode(static_port.c_str(), true);
     _altitude_node = node->getChild("indicated-altitude-ft", 0, true);
-
-    _serviceable_node->setBoolValue(true);
-    _setting_node->setDoubleValue(29.92);
 }
 
 void