From 000e86756cf39fd240fffe205e9be3d8e58068cf Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 3 Mar 2003 04:34:27 +0000 Subject: [PATCH] Add support for --fdm=pipe, --- src/Main/Makefile.am | 1 + src/Main/fg_init.cxx | 7 ++++++- src/Main/options.cxx | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Main/Makefile.am b/src/Main/Makefile.am index cd65a50fc..bdca16c8d 100644 --- a/src/Main/Makefile.am +++ b/src/Main/Makefile.am @@ -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 \ diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 63c25b329..363a0590a 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -86,6 +86,7 @@ #include #include #include +#include #include #include #include @@ -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" ) { diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 1551ecd28..c5a5b67ae 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -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); -- 2.39.5