Changeset 20088

Show
Ignore:
Timestamp:
05/01/07 21:25:11 (2 years ago)
Author:
patrick
Message:

Merges from the trunk:

r19958: 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.

r19959: Bring libp5glove 0.3 onto the main branch. This is needed to

compile the new P5 Glove driver.

r19960: Added the config definition for the Essential Reality P5 Glove

driver.

r19962: The path for the libp5glove source changed between when I was

getting it incorporated and when I copied the source from its
vendor branch.

r19963: Explain the how and the what of libp5glove's vendor branch and

its use here.

r19964: Use exception handling to determine if the thread spawned

successfully. Moved debug output about the process of connecting
to the hardware from vprDBG_CONFIG_LVL to vprDBG_STATE_LVL.


r19965: If the connection to the hardware fails, do not spawn a sampling

thread.


r19967: Set the EOL style to native. No content changes.

r19970: This [config.h] is a dummy file that I have added to allow

usb_hid_libusb.c to compile without being modified relative to its
vendor branch version.

r19972: Always test for the availability of libusb-config. I think that it

is a fairly common thing to have on Linux distributions.

r19988: Explain the purpose of this file [config.h].

r20020: Fixed a typo so that we only run libusb-config when it is

available.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/modules/gadgeteer/drivers/EssentialReality/P5Glove/P5Glove.rc

    • Property svn:eol-style set to native
  • juggler/branches/2.2/modules/gadgeteer/drivers/EssentialReality/P5Glove/libp5glove/src/config.h

    r19970 r20088  
     1/* 
     2 * This file exists so that usb_hid_libusb.c can be compiled without 
     3 * modifications relative to the libp5glvoe vendor branch. At some point, 
     4 * this file might also be used to set preprocessor symbols needed by 
     5 * usb_hid_libusb.c and/or p5glove.c, but so far, that has not been 
     6 * necessary. 
     7 */ 
     8 
     9#ifndef P5GLOVE_CONFIG_H 
     10#define P5GLOVE_CONFIG_H 
     11 
     12 
     13#endif /* P5GLOVE_CONFIG_H */ 
  • juggler/branches/2.2/modules/gadgeteer/drivers/Makefile.in

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

    r19847 r20088  
    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   AC_PATH_PROG([LIBUSB_CONFIG], [libusb-config], [no], 
     479                [${_with_libusb}/bin]) 
     480else 
     481   AC_PATH_PROG([LIBUSB_CONFIG], [libusb-config], [no]) 
     482fi 
     483 
     484if test "x$LIBUSB_CONFIG" != "xno" ; then 
     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 
  • juggler/branches/2.2/modules/vrjuggler/data/definitions/p5_glove.jdef

    • Property svn:eol-style set to native