Added custom joystick client support so that flight gear can read values
being shipped over from a separate joystick server.
This commit is contained in:
parent
f03cfb6b4a
commit
96c20e6532
3 changed files with 13 additions and 7 deletions
|
@ -41,6 +41,7 @@
|
|||
#include <Network/nmea.hxx>
|
||||
#include <Network/pve.hxx>
|
||||
#include <Network/rul.hxx>
|
||||
#include <Network/joyclient.hxx>
|
||||
|
||||
#include <Time/timestamp.hxx>
|
||||
|
||||
|
@ -86,6 +87,9 @@ static FGProtocol *parse_port_config( const string& config )
|
|||
} else if ( protocol == "rul" ) {
|
||||
FGRUL *rul = new FGRUL;
|
||||
io = rul;
|
||||
} else if ( protocol == "joyclient" ) {
|
||||
FGJoyClient *joyclient = new FGJoyClient;
|
||||
io = joyclient;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1292,10 +1292,6 @@ int main( int argc, char **argv ) {
|
|||
_control87(MCW_EM, MCW_EM); /* defined in float.h */
|
||||
#endif
|
||||
|
||||
// Initialize ssg (from plib). Needs to come before we do any
|
||||
// other ssg related stuff
|
||||
ssgInit();
|
||||
|
||||
// set default log levels
|
||||
fglog().setLogLevels( FG_ALL, FG_INFO );
|
||||
|
||||
|
@ -1324,10 +1320,14 @@ int main( int argc, char **argv ) {
|
|||
|
||||
// Initialize the various GLUT Event Handlers.
|
||||
if( !fgGlutInitEvents() ) {
|
||||
FG_LOG( FG_GENERAL, FG_ALERT,
|
||||
"GLUT event handler initialization failed ..." );
|
||||
exit(-1);
|
||||
FG_LOG( FG_GENERAL, FG_ALERT,
|
||||
"GLUT event handler initialization failed ..." );
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// Initialize ssg (from plib). Needs to come before we do any
|
||||
// other ssg stuff, but after opengl/glut has been initialized.
|
||||
ssgInit();
|
||||
|
||||
// Initialize the user interface (we need to do this before
|
||||
// passing off control to glut and before fgInitGeneral to get our
|
||||
|
|
|
@ -767,6 +767,8 @@ int fgOPTIONS::parse_option( const string& arg ) {
|
|||
parse_channel( "pve", arg.substr(6) );
|
||||
} else if ( arg.find( "--rul=" ) != string::npos ) {
|
||||
parse_channel( "rul", arg.substr(6) );
|
||||
} else if ( arg.find( "--joyclient=" ) != string::npos ) {
|
||||
parse_channel( "joyclient", arg.substr(12) );
|
||||
#ifdef FG_NETWORK_OLK
|
||||
} else if ( arg == "--disable-network-olk" ) {
|
||||
network_olk = false;
|
||||
|
|
Loading…
Reference in a new issue