]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/jsclient.cxx
Create TimeManager subsystem, and collect the time related code out of main.cxx and...
[flightgear.git] / src / Network / jsclient.cxx
index a97ab631312ca908116ddbcd97783fbcca431fda..2ee35320daefd605f23a6a95cb93eebce4b4e90d 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright (C) 2003 by Manuel Bessler and Stephen Lowry
 //
 // based on joyclient.cxx by Curtis Olson
-// Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2000  Curtis L. Olson - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/io/iochannel.hxx>
+#include <simgear/misc/stdint.hxx>
 
-#include <Aircraft/aircraft.hxx>
 #include <Main/fg_props.hxx>
 
 #include "jsclient.hxx"
@@ -88,8 +91,7 @@ bool FGJsClient::process() {
        if ( io->get_type() == sgFileType ) {
            if ( io->read( (char *)(& buf), length ) == length ) {
                SG_LOG( SG_IO, SG_DEBUG, "Success reading data." );
-               long int *msg;
-               msg = (long int *)buf;
+               int32_t *msg = (int32_t *)buf;
                for( int i = 0; i < 4; ++i )
                {
                        axis[i] = ((double)msg[i] / 2147483647.0);
@@ -102,8 +104,7 @@ bool FGJsClient::process() {
        } else {
            while ( io->read( (char *)(& buf), length ) == length ) {
                SG_LOG( SG_IO, SG_DEBUG, "Success reading data." );
-               long int *msg;
-               msg = (long int *)buf;
+               int32_t *msg = (int32_t *)buf;
                SG_LOG( SG_IO, SG_DEBUG, "ax0 = " << msg[0] << " ax1 = "
                        << msg[1] << "ax2 = " << msg[2] << "ax3 = " << msg[3]);
                for( int i = 0; i < 4; ++i )