(self, data)
Receives packets from headset for Windows. Sends them to a Queue to be processed
        by the crypto thread.
Receives packets from headset for Windows. Sends them to a Queue to be processed
        by the crypto thread.
Receives packets from headset for Windows . Sends them to a Queue to be processed by the crypto thread .
def data_handler(self, data):
        """
        Receives packets from headset for Windows. Sends them to a Queue to be processed
        by the crypto thread.
        """
        self.lock.acquire()
        if not self._stop_signal:
            self.lock.release()
            data = validate_data(data, new_format=self.new_format)
            if data is not None:
                self.data.put_nowait(EmotivReaderTask(data=''.join(map(chr, data[1:])), timestamp=datetime.now()))
        else:
            self.lock.release()
def data_handler ( self , data ) : self . lock . acquire ( ) if not self . _stop_signal : self . lock . release ( ) data = validate_data ( data , new_format = self . new_format ) if data is not None : self . data . put_nowait ( EmotivReaderTask ( data = '' . join ( map ( chr , data [ 1 : ] ) ) , timestamp = datetime . now ( ) ) ) else : self . lock . release ( )