]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/hud.cxx
Property patches from Frederic Bouvier:
[flightgear.git] / src / Cockpit / hud.cxx
index 098e755c73a717f1e833824e60faf5f07801b4f1..9d5f5272b64a44ba18be81017bf4208771119248 100644 (file)
@@ -38,7 +38,8 @@
 
 #include <GL/glut.h>
 #include <stdlib.h>
-#include <stdio.h>     //char related functions
+#include <stdio.h>             // char related functions
+#include <string.h>            // strcmp()
 #include STL_STRING
 #include STL_FSTREAM
 
@@ -392,6 +393,8 @@ readCard(const SGPropertyNode * node)
         load_fn = get_aileronval;
     } else if (loadfn=="elevatorval") {
         load_fn = get_elevatorval;
+    } else if (loadfn=="elevatortrimval") {
+        load_fn = get_elev_trimval;
     } else if (loadfn=="rudderval") {
         load_fn = get_rudderval;
     } else if (loadfn=="throttleval") {
@@ -645,10 +648,12 @@ readTBI(const SGPropertyNode * node)
 
 int readInstrument(const SGPropertyNode * node)
 {
+    static const SGPropertyNode *startup_units_node
+        = fgGetNode("/sim/startup/units");
 
     instr_item *HIptr;
     
-    if ( fgGetString("/sim/startup/units") == "feet" ) {
+    if ( !strcmp(startup_units_node->getStringValue(), "feet") ) {
         strcpy(units, " ft");
     } else {
         strcpy(units, " m");