(self)
Wait for new DS4 devices to appear.
Wait for new DS4 devices to appear.
Wait for new DS4 devices to appear .
def devices(self):
        """Wait for new DS4 devices to appear."""
        log_msg = True
        while True:
            if log_msg:
                self.logger.info("Scanning for devices")

            try:
                device = self.find_device()
                if device:
                    yield device
                    log_msg = True
                else:
                    log_msg = False
            except BackendError as err:
                self.logger.error("Error while scanning for devices: {0}",
                                  err)
                return
            except DeviceError as err:
                self.logger.error("Unable to connect to detected device: {0}",
                                  err)
def devices ( self ) : log_msg = True while True : if log_msg : self . logger . info ( "Scanning for devices" ) try : device = self . find_device ( ) if device : yield device log_msg = True else : log_msg = False except BackendError as err : self . logger . error ( "Error while scanning for devices: {0}" , err ) return except DeviceError as err : self . logger . error ( "Unable to connect to detected device: {0}" , err )