From cd5ab3222a56a7cb3ddc28b3741c838526cfe530 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 23 Nov 1999 05:51:14 +0000 Subject: [PATCH] Added FGFS "Native" I/O protocol. --- src/Main/fg_io.cxx | 6 +++++- src/Main/options.cxx | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Main/fg_io.cxx b/src/Main/fg_io.cxx index 8e9f40e99..82cdf7b29 100644 --- a/src/Main/fg_io.cxx +++ b/src/Main/fg_io.cxx @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -69,7 +70,10 @@ static FGProtocol *parse_port_config( const string& config ) FG_LOG( FG_IO, FG_INFO, " protocol = " << protocol ); FGProtocol *io; - if ( protocol == "garmin" ) { + if ( protocol == "native" ) { + FGNative *native = new FGNative; + io = native; + } else if ( protocol == "garmin" ) { FGGarmin *garmin = new FGGarmin; io = garmin; } else if ( protocol == "nmea" ) { diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 756d1935a..a7176cc76 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -535,7 +535,7 @@ fgOPTIONS::parse_fov( const string& arg ) { // // Format is "--protocol=medium,direction,hz,medium_options,..." // -// protocol = { nmea, garmin, fgfs, rul, pve, etc. } +// protocol = { native, nmea, garmin, fgfs, rul, pve, etc. } // medium = { serial, socket, file, etc. } // direction = { in, out, bi } // hz = number of times to process channel per second (floating @@ -746,8 +746,8 @@ int fgOPTIONS::parse_option( const string& arg ) { tris_or_culled = 0; } else if ( arg == "--hud-culled" ) { tris_or_culled = 1; - } else if ( arg.find( "--fgfs=" ) != string::npos ) { - parse_channel( "fgfs", arg.substr(7) ); + } else if ( arg.find( "--native=" ) != string::npos ) { + parse_channel( "native", arg.substr(9) ); } else if ( arg.find( "--garmin=" ) != string::npos ) { parse_channel( "garmin", arg.substr(9) ); } else if ( arg.find( "--nmea=" ) != string::npos ) {