From 7316cfd48570911143972b9594fa64d84a483613 Mon Sep 17 00:00:00 2001 From: Mark Cannon Date: Wed, 13 Feb 2008 16:10:31 +0000 Subject: [PATCH] PIUIO and USBDriver should compile and work now git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg@17 83fadc84-e282-4d84-a09a-c4228d6ae7e5 --- src/Makefile.am | 6 ++++++ src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 808125db..0a8c2819 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -109,6 +109,12 @@ StepMania = StdString.h \ LoadingWindow = arch/LoadingWindow/LoadingWindow.h \ arch/LoadingWindow/LoadingWindow_Null.h +#if HAVE_LIBUSB +LIBS += -lusb +DataStructures += io/USBDriver.cpp io/USBDriver.h \ + io/PIUIO.cpp io/PIUIO.h +#endif + if HAVE_GTK LoadingWindow += arch/LoadingWindow/LoadingWindow_Gtk.cpp arch/LoadingWindow/LoadingWindow_Gtk.h endif diff --git a/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp b/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp index 797f726f..5256550a 100644 --- a/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp +++ b/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp @@ -9,8 +9,6 @@ InputHandler_Linux_PIUIO::InputHandler_Linux_PIUIO() { m_bShutdown = false; -// IOBoard.FindDevice - // device found and set if( IOBoard.Open() ) { @@ -19,6 +17,11 @@ InputHandler_Linux_PIUIO::InputHandler_Linux_PIUIO() InputThread.SetName( "PIUIO thread" ); InputThread.Create( InputThread_Start, this ); } + else + { + LOG->Warn( "InputHandler_Linux_PIUIO: could not open I/O board." ); + + } InputHandler_Linux_PIUIO::~InputHandler_Linux_PIUIO() @@ -34,8 +37,6 @@ InputHandler_Linux_PIUIO::~InputHandler_Linux_PIUIO() // remember to delete device handler when finished } - - bool InputHandler_Linux_PIUIO::DeviceMatches( int idVendor, int idProduct ) { if( idVendor == 1351 && idProduct == 4098 ) @@ -105,6 +106,7 @@ int InputHandler_Linux_PIUIO::InputThread_Start( void *p ) void InputHandler_Linux_PIUIO::InputThreadMain() { UpdateLights(); + Write(); } void InputHandler_Linux_PIUIO::UpdateLights() -- 2.11.0