1
0
Fork 0

Added FGFS "Native" I/O protocol.

This commit is contained in:
curt 1999-11-23 05:51:14 +00:00
parent 8c70ec7026
commit cd5ab3222a
2 changed files with 8 additions and 4 deletions

View file

@ -35,6 +35,7 @@
#include <Network/fg_socket.hxx> #include <Network/fg_socket.hxx>
#include <Network/protocol.hxx> #include <Network/protocol.hxx>
#include <Network/native.hxx>
#include <Network/garmin.hxx> #include <Network/garmin.hxx>
#include <Network/nmea.hxx> #include <Network/nmea.hxx>
#include <Network/pve.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 ); FG_LOG( FG_IO, FG_INFO, " protocol = " << protocol );
FGProtocol *io; FGProtocol *io;
if ( protocol == "garmin" ) { if ( protocol == "native" ) {
FGNative *native = new FGNative;
io = native;
} else if ( protocol == "garmin" ) {
FGGarmin *garmin = new FGGarmin; FGGarmin *garmin = new FGGarmin;
io = garmin; io = garmin;
} else if ( protocol == "nmea" ) { } else if ( protocol == "nmea" ) {

View file

@ -535,7 +535,7 @@ fgOPTIONS::parse_fov( const string& arg ) {
// //
// Format is "--protocol=medium,direction,hz,medium_options,..." // 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. } // medium = { serial, socket, file, etc. }
// direction = { in, out, bi } // direction = { in, out, bi }
// hz = number of times to process channel per second (floating // 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; tris_or_culled = 0;
} else if ( arg == "--hud-culled" ) { } else if ( arg == "--hud-culled" ) {
tris_or_culled = 1; tris_or_culled = 1;
} else if ( arg.find( "--fgfs=" ) != string::npos ) { } else if ( arg.find( "--native=" ) != string::npos ) {
parse_channel( "fgfs", arg.substr(7) ); parse_channel( "native", arg.substr(9) );
} else if ( arg.find( "--garmin=" ) != string::npos ) { } else if ( arg.find( "--garmin=" ) != string::npos ) {
parse_channel( "garmin", arg.substr(9) ); parse_channel( "garmin", arg.substr(9) );
} else if ( arg.find( "--nmea=" ) != string::npos ) { } else if ( arg.find( "--nmea=" ) != string::npos ) {