]> git.mxchange.org Git - flightgear.git/commitdiff
Added FGFS "Native" I/O protocol.
authorcurt <curt>
Tue, 23 Nov 1999 05:51:14 +0000 (05:51 +0000)
committercurt <curt>
Tue, 23 Nov 1999 05:51:14 +0000 (05:51 +0000)
src/Main/fg_io.cxx
src/Main/options.cxx

index 8e9f40e99dc40a2c05cba6fee3d225ebf0bd7b61..82cdf7b29d36d8c3fc6d94dad65d24d6c4a5b016 100644 (file)
@@ -35,6 +35,7 @@
 #include <Network/fg_socket.hxx>
 
 #include <Network/protocol.hxx>
+#include <Network/native.hxx>
 #include <Network/garmin.hxx>
 #include <Network/nmea.hxx>
 #include <Network/pve.hxx>
@@ -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" ) {
index 756d1935acd9bced1f384e267a1efc585cc57ace..a7176cc767ff0a4f82cf9acfff1aaa9b167111c2 100644 (file)
@@ -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 ) {