]> git.mxchange.org Git - flightgear.git/commitdiff
Add support for --fdm=pipe,<pipe_name>
authorcurt <curt>
Mon, 3 Mar 2003 04:34:27 +0000 (04:34 +0000)
committercurt <curt>
Mon, 3 Mar 2003 04:34:27 +0000 (04:34 +0000)
src/Main/Makefile.am
src/Main/fg_init.cxx
src/Main/options.cxx

index cd65a50fc9133c5548e5fdcbf803f4049678d3db..bdca16c8d97ffe3a74f40f2e72356e78a09b8d44 100644 (file)
@@ -63,6 +63,7 @@ fgfs_LDADD = \
        $(top_builddir)/src/FDM/libFlight.a \
        $(top_builddir)/src/FDM/Balloon/libBalloon.a \
        $(top_builddir)/src/FDM/ExternalNet/libExternalNet.a \
+       $(top_builddir)/src/FDM/ExternalPipe/libExternalPipe.a \
        $(top_builddir)/src/FDM/JSBSim/libJSBSim.a \
        $(top_builddir)/src/FDM/YASim/libYASim.a \
        $(top_builddir)/src/FDM/JSBSim/filtersjb/libfiltersjb.a \
index 63c25b329844da9c9a6b806885c6829a021bf185..363a0590a6cd388799be1b6675dbe190fcef5494 100644 (file)
@@ -86,6 +86,7 @@
 #include <FDM/ADA.hxx>
 #include <FDM/Balloon.h>
 #include <FDM/ExternalNet/ExternalNet.hxx>
+#include <FDM/ExternalPipe/ExternalPipe.hxx>
 #include <FDM/JSBSim/JSBSim.hxx>
 #include <FDM/LaRCsim.hxx>
 #include <FDM/MagicCarpet.hxx>
@@ -1058,7 +1059,6 @@ static bool fgSetPosFromFix( const string& id ) {
 bool
 fgInitNav ()
 {
-
     SG_LOG(SG_GENERAL, SG_INFO, "Loading Navaids");
 
     SG_LOG(SG_GENERAL, SG_INFO, "  VOR/NDB");
@@ -1080,6 +1080,8 @@ fgInitNav ()
     SGPath p_fix( globals->get_fg_root() );
     p_fix.append( "Navaids/default.fix" );
     current_fixlist->init( p_fix );
+
+    return true;
 }
 
 
@@ -1298,6 +1300,9 @@ void fgInitFDM() {
                 begin = end + 1;
             }
             cur_fdm_state = new FGExternalNet( dt, host, port1, port2, port3 );
+        } else if ( model.find("pipe") == 0 ) {
+            string pipe_path = model.substr(5);
+            cur_fdm_state = new FGExternalPipe( dt, pipe_path );
         } else if ( model == "null" ) {
             cur_fdm_state = new FGNullFDM( dt );
         } else if ( model == "yasim" ) {
index 1551ecd28f215b58e516ad668d81f05497deed8e..c5a5b67ae3b40cf9b522a74e96e61f21ff1df0d4 100644 (file)
@@ -1962,8 +1962,9 @@ void fgShowAircraft(void) {
 
    sort(aircraft.begin(), aircraft.end());
    cout << "Available aircraft:" << endl;
-   for (int i = 0; i < aircraft.size(); i++)
-      cout << aircraft[i] << endl;
+   for ( unsigned int i = 0; i < aircraft.size(); i++ ) {
+       cout << aircraft[i] << endl;
+   }
 
    aircraft.clear();
    ulCloseDir(dirp);