tools/hidraw.py
def read(self, timeout: Union[int, float] = 1) -> List[int]:
        '''
        Reads data from the hidraw node
        '''
        max_time = time.time() + timeout

        buf: Optional[bytes] = None
        while not buf and time.time() < max_time:
            try:
                buf = self._fd.read()
            except BrokenPipeError:
                pass
            time.sleep(0.001)

        return list(buf or [])

        Reads data from the hidraw node
        
Reads data from the hidraw node
Reads data from the hidraw node
def read(self, timeout: Union[int, float] = 1) -> List[int]:
        max_time = time.time() + timeout
        buf: Optional[bytes] = None
        while not buf and time.time() < max_time:
            try:
                buf = self._fd.read()
            except BrokenPipeError:
                pass
            time.sleep(0.001)
        return list(buf or [])
def read ( self , timeout : Union [ int , float ] = 1 ) -> List [ int ] : max_time = time . time ( ) + timeout buf : Optional [ bytes ] = None while not buf and time . time ( ) < max_time : try : buf = self . _fd . read ( ) except BrokenPipeError : pass time . sleep ( 0.001 ) return list ( buf or [ ] )
Reads data from the hidraw node
Reads data from the hidraw node
'''
        Reads data from the hidraw node
        '''
self
timeout
Union[int, float]