]> git.mxchange.org Git - flightgear.git/blobdiff - Cockpit/hud.cxx
Converted to new logstream debugging facility. This allows release
[flightgear.git] / Cockpit / hud.cxx
index 5a5f8ec809ce4ecbf7cb11b95c284d246798adec..a234f5c64ae6ac5b78e1bf7208abf6db859ca0f2 100644 (file)
@@ -39,7 +39,7 @@
 #endif
 
 #include <Aircraft/aircraft.hxx>
-#include <Debug/fg_debug.h>
+#include <Debug/logstream.hxx>
 #include <Include/fg_constants.h>
 #include <Main/options.hxx>
 #include <Math/fg_random.h>
@@ -47,7 +47,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 #if defined ( __sun__ ) || defined ( __sgi )
 extern "C" {
@@ -58,6 +57,7 @@ extern "C" {
 #include "hud.hxx"
 
 
+static char units[5];
 
 // The following routines obtain information concerntin the aircraft's
 // current state and return it to calling instrument display routines.
@@ -150,7 +150,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
   instr_item *HIptr;
   int index;
 
-  fgPrintf( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD\n" );
+  FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
 
   HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());  // empty the HUD deque
 
@@ -532,7 +532,7 @@ int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
     instr_item *HIptr;
     int index;
 
-    fgPrintf( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD\n" );
+    FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
 
     HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());
 
@@ -617,11 +617,16 @@ int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
                         TRUE );
     HUD_deque.push_front( p );
 
+    if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
+       strcpy(units, " ft");
+    } else {
+       strcpy(units, " m");
+    }
     p = new instr_label( x_pos, 25, 40, 10,
                         get_altitude,
                         "%5.0f",
                         "Altitude ",
-                        " m",
+                        units,
                         1.0,
                         HUDS_TOP,
                         RIGHT_JUST,
@@ -830,6 +835,17 @@ void fgUpdateHUD( void ) {
 }
 
 // $Log$
+// Revision 1.27  1998/11/06 21:17:47  curt
+// Converted to new logstream debugging facility.  This allows release
+// builds with no messages at all (and no performance impact) by using
+// the -DFG_NDEBUG flag.
+//
+// Revision 1.26  1998/11/03 12:33:11  curt
+// Display ft or m in mini-hud next to altitude.
+//
+// Revision 1.25  1998/10/17 01:33:57  curt
+// C++ ifying ...
+//
 // Revision 1.24  1998/10/16 23:27:25  curt
 // C++-ifying.
 //