Ejemplo n.º 1
0
def set_debug(value):
    '''Set the debug level to the bitwise OR of one or more of the following:
     * HID_DEBUG_NONE (0; default)
     * HID_DEBUG_ERRORS 
     * HID_DEBUG_WARNINGS
     * HID_DEBUG_NOTICES
     * HID_DEBUG_TRACES
     * HID_DEBUG_ASSERTS
     * HID_DEBUG_NOTRACES
     * HID_DEBUG_ALL
    '''
    hid.hid_set_debug(value)
Ejemplo n.º 2
0
def set_debug(value):
    '''Set the debug level to the bitwise OR of one or more of the following:
     * HID_DEBUG_NONE (0; default)
     * HID_DEBUG_ERRORS 
     * HID_DEBUG_WARNINGS
     * HID_DEBUG_NOTICES
     * HID_DEBUG_TRACES
     * HID_DEBUG_ASSERTS
     * HID_DEBUG_NOTRACES
     * HID_DEBUG_ALL
    '''
    hid.hid_set_debug(value)
Ejemplo n.º 3
0
 def __init__(self, id=None, errstream=sys.stderr):
     self._id = None
     self._error = errstream
     # Debugging
     if DEBUG:
         hid.hid_set_debug(hid.HID_DEBUG_ALL)
         hid.hid_set_debug_stream(self._error)
         hid.hid_set_usb_debug(0)
     # Initialisation
     if not hid.hid_is_initialised(): # Doesn't seem to work
         try: # Belt AND braces, Sir?
             hid.hid_init()
         except HIDError:
             pass
     self._interface = hid.hid_new_HIDInterface()
     # Ensure we only use one HIDMatcher class per
     # type of sensor, with some reflection-fu.
     #if not 'MATCHER' in self.__class__.__dict__:
     if not hasattr(self.__class__, 'MATCHER'):
         self.__class__.MATCHER = HIDMatcher(self.__class__.VID,
                                             self.__class__.PID)
     return
Ejemplo n.º 4
0
def set_debug(value):
    hid.hid_set_debug(value)
Ejemplo n.º 5
0
def set_debug(value):
    hid.hid_set_debug(value)