]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/ATC-Outputs.cxx
httpd: don't spam the console with debug messages
[flightgear.git] / src / Network / ATC-Outputs.cxx
index b5078a5810cd796ff581e6d53dde5a3e9f6ea24b..dd9e32cdd936ffee6ebf05ed1046cf30bedcb020 100644 (file)
@@ -20,6 +20,7 @@
 //
 // $Id$
 
+// TODO FIXME Module still contains lots of "static SGPropertyNode"s below.
 
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
@@ -31,6 +32,7 @@
 #  include <sys/types.h>
 #  include <sys/stat.h>
 #  include <fcntl.h>
+#  include <stdlib.h>
 #  include <unistd.h>
 #  include <ostream>
 #endif
@@ -39,6 +41,7 @@
 #include <math.h>
 
 #include <string>
+#include <cstdio>
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
@@ -173,6 +176,7 @@ static int ATCSetStepper( int fd, unsigned char channel,
 }
 
 
+#ifdef ATCFLIGHTSIM_HAVE_COMPASS
 // Read status of last stepper written to
 static unsigned char ATCReadStepper( int fd ) {
 #if defined( unix ) || defined( __CYGWIN__ )
@@ -195,6 +199,7 @@ static unsigned char ATCReadStepper( int fd ) {
     return 0;
 #endif
 }
+#endif
 
 
 // Turn a lamp on or off
@@ -346,9 +351,7 @@ bool FGATCOutput::open( int lock_fd ) {
 
        ATCRelease( lock_fd );
 
-#if defined( _MSC_VER )
-       ulMilliSecondSleep(33);
-#elif defined (WIN32) && !defined(__CYGWIN__)
+#ifdef _WIN32
         Sleep (33);
 #else
        usleep(33);
@@ -464,22 +467,18 @@ bool FGATCOutput::do_analog_out() {
                 }
                 prop = child->getChild( "value-lo" );
                 if ( prop != NULL ) {
-                    prop = fgGetNode( prop->getStringValue(), true );
                    x0 = prop->getDoubleValue();
                 }
                 prop = child->getChild( "meter-lo" );
                 if ( prop != NULL ) {
-                    prop = fgGetNode( prop->getStringValue(), true );
                    y0 = prop->getDoubleValue();
                 }
                 prop = child->getChild( "value-hi" );
                 if ( prop != NULL ) {
-                    prop = fgGetNode( prop->getStringValue(), true );
                    x1 = prop->getDoubleValue();
                 }
                 prop = child->getChild( "meter-hi" );
                 if ( prop != NULL ) {
-                    prop = fgGetNode( prop->getStringValue(), true );
                    y1 = prop->getDoubleValue();
                 }
                // crunch linear interpolation formula