From: curt Date: Sun, 12 Jan 2003 23:39:18 +0000 (+0000) Subject: Update to the Mini FDM network protocal (mostly renaming class and file names) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f3d4f741f097e1a9e1545389b95413d8b78f3b0f;p=flightgear.git Update to the Mini FDM network protocal (mostly renaming class and file names) Wired this in to options.cxx and fg_io.cxx so it can be activated. --- diff --git a/src/Main/fg_io.cxx b/src/Main/fg_io.cxx index b623d2a5e..b987fe6a7 100644 --- a/src/Main/fg_io.cxx +++ b/src/Main/fg_io.cxx @@ -46,6 +46,7 @@ # include #endif #include +#include #include #include #include @@ -136,6 +137,9 @@ FGIO::parse_port_config( const string& config ) } else if ( protocol == "native_fdm" ) { FGNativeFDM *native_fdm = new FGNativeFDM; io = native_fdm; + } else if ( protocol == "mini_fdm" ) { + FGMiniFDM *mini_fdm = new FGMiniFDM; + io = mini_fdm; } else if ( protocol == "nmea" ) { FGNMEA *nmea = new FGNMEA; io = nmea; diff --git a/src/Main/options.cxx b/src/Main/options.cxx index ce2c40f2f..abe3acb61 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -915,6 +915,8 @@ parse_option (const string& arg) add_channel( "native_ctrls", arg.substr(15) ); } else if ( arg.find( "--native-fdm=" ) == 0 ) { add_channel( "native_fdm", arg.substr(13) ); + } else if ( arg.find( "--mini-fdm=" ) == 0 ) { + add_channel( "mini_fdm", arg.substr(13) ); } else if ( arg.find( "--opengc=" ) == 0 ) { // char stop; // cout << "Adding channel for OpenGC Display" << endl; cin >> stop; diff --git a/src/Network/Makefile.am b/src/Network/Makefile.am index d9a2eed61..5d307cd55 100644 --- a/src/Network/Makefile.am +++ b/src/Network/Makefile.am @@ -14,10 +14,10 @@ libNetwork_a_SOURCES = \ httpd.cxx httpd.hxx \ $(JPEG_SERVER) \ joyclient.cxx joyclient.hxx \ + mini_fdm.cxx mini_fdm.hxx \ native.cxx native.hxx \ native_ctrls.cxx native_ctrls.hxx \ native_fdm.cxx native_fdm.hxx \ - native_fdm_mini.cxx native_fdm_mini.hxx \ net_ctrls.hxx net_fdm.hxx net_fdm_mini.hxx \ nmea.cxx nmea.hxx \ opengc.cxx opengc.hxx opengc_data.hxx \ diff --git a/src/Network/mini_fdm.cxx b/src/Network/mini_fdm.cxx new file mode 100644 index 000000000..f5b7ef229 --- /dev/null +++ b/src/Network/mini_fdm.cxx @@ -0,0 +1,244 @@ +// native_fdm.cxx -- FGFS "Native" flight dynamics protocal class +// +// Written by Curtis Olson, started September 2001. +// +// Copyright (C) 2001 Curtis L. Olson - curt@flightgear.org +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 2 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// 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. +// +// $Id$ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include // endian tests +#include +#include + +#include +#include