diff --git a/.gitignore b/.gitignore index 865b8c0..3ca4900 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,5 @@ venv.bak/ # mypy .mypy_cache/ + +edl_config.json \ No newline at end of file diff --git a/edlclient/Library/Connection/usblib.py b/edlclient/Library/Connection/usblib.py index 54a129d..6fe2de6 100755 --- a/edlclient/Library/Connection/usblib.py +++ b/edlclient/Library/Connection/usblib.py @@ -49,6 +49,8 @@ USB_RECIP_OTHER = 0x03 USB_RECIP_PORT = 0x04 USB_RECIP_RPIPE = 0x05 +MAX_USB_BULK_BUFFER_SIZE = 16384 + tag = 0 CDC_CMDS = { @@ -336,7 +338,8 @@ class usb_class(DeviceClass): def write(self, command, pktsize=None): if pktsize is None: - pktsize = self.EP_OUT.wMaxPacketSize + #pktsize = self.EP_OUT.wMaxPacketSize + pktsize = MAX_USB_BULK_BUFFER_SIZE if isinstance(command, str): command = bytes(command, 'utf-8') pos = 0