Changeset 19958

Show
Ignore:
Timestamp:
04/21/07 10:05:42 (2 years ago)
Author:
patrick
Message:

Added a driver for the USB P5 Glove from Essential Reality. This was
originally submitted by Damien Touraine. I made many modifications to the
code before committing it in this form (including adding Mac OS X support),
but the basic functionality is the same as what Damien submitted.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/drivers/Makefile.in

    r19729 r19958  
    136136        Ascension/Wanda                 \ 
    137137        Elexol/Ether24                  \ 
     138        EssentialReality/P5Glove        \ 
    138139        Fakespace/PinchGlove            \ 
    139140        Immersion/IBox                  \ 
  • juggler/trunk/modules/gadgeteer/drivers/configure.ac

    r19944 r19958  
    7878AC_ARG_WITH(vrpn, [  --with-vrpn=<PATH>      VRPN installation], 
    7979            _with_vrpn="$withval", _with_vrpn='no') 
     80 
     81# Build with libusb path. Then, include the P5Gove drivers ... 
     82# There is default path. 
     83AC_ARG_WITH(libusb, [  --with-libusb=<PATH>    libusb installation], 
     84            _with_libusb="$withval", _with_libusb='no') 
    8085 
    8186# Define the binary format. 
     
    465470fi 
    466471 
     472# ----------------------------------------------------------------------------- 
     473# libusb 
     474# ----------------------------------------------------------------------------- 
     475 
     476# Test for the libusb library 
     477if test "x${_with_libusb}" != "xno" ; then 
     478   if test "x${_with_libusb}" != "xno" ; then 
     479      AC_PATH_PROG([LIBUSB_CONFIG], [libusb-config], [no], 
     480                   [${_with_libusb}/bin]) 
     481   else 
     482      AC_PATH_PROG([LIBUSB_CONFIG], [libusb-config], [no]) 
     483   fi 
     484 
     485   _gadget_save_CFLAGS="$CFLAGS" 
     486   _gadget_save_CPPFLAGS="$CPPFLAGS" 
     487   _gadget_save_LDFLAGS="$LDFLAGS" 
     488   _gadget_save_LIBS="$LIBS" 
     489 
     490   LIBUSB_CFLAGS=`$LIBUSB_CONFIG --cflags` 
     491   LIBUSB_LIBS=`$LIBUSB_CONFIG --libs` 
     492 
     493   CPPFLAGS="$LIBUSB_CFLAGS $CPPFLAGS" 
     494   LDFLAGS="$LIBUSB_LIBS $LDFLAGS" 
     495 
     496   gadget_have_libusb='no' 
     497 
     498   DPP_LANG_SAVE 
     499   DPP_LANG_C 
     500 
     501   AC_CHECK_LIB(usb, usb_init, 
     502                [AC_CHECK_HEADER([usb.h], [gadget_have_libusb='yes'], 
     503                                 [gadget_have_libusb='no'])], 
     504                [gadget_have_libusb='no']) 
     505 
     506   DPP_LANG_RESTORE 
     507 
     508   if test "x$gadget_have_libusb" = "xyes" ; then 
     509      HAVE_LIBUSB='Y' 
     510   else 
     511      HAVE_LIBUSB='N' 
     512      AC_MSG_WARN([*** Did not find libusb ***]) 
     513   fi 
     514 
     515   CFLAGS="${_gadget_save_CFLAGS}" 
     516   CPPFLAGS="${_gadget_save_CPPFLAGS}" 
     517   LDFLAGS="${_gadget_save_LDFLAGS}" 
     518   LIBS="${_gadget_save_LIBS}" 
     519fi 
    467520 
    468521# ----------------------------------------------------------------------------- 
     
    613666AC_SUBST(VRPNROOT) 
    614667AC_SUBST(VRPN_LDFLAGS) 
     668 
     669AC_SUBST(HAVE_LIBUSB) 
     670AC_SUBST(LIBUSB_CFLAGS) 
     671AC_SUBST(LIBUSB_LIBS) 
    615672 
    616673AC_SUBST(DSO_DRIVER_DEPS) 
     
    643700   Elexol/Makefile 
    644701   Elexol/Ether24/Makefile 
     702   EssentialReality/Makefile 
     703   EssentialReality/P5Glove/Makefile 
    645704   Fakespace/Makefile 
    646705   Fakespace/PinchGlove/Makefile