From 66b9871365e7b95617b28c05f610128d71becd88 Mon Sep 17 00:00:00 2001 From: bongbui321 Date: Tue, 19 Mar 2024 04:21:30 -0400 Subject: [PATCH] improve speed --- .gitignore | 2 ++ edlclient/Library/Connection/usblib.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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_PORT = 0x04 USB_RECIP_RPIPE = 0x05 +MAX_USB_BULK_BUFFER_SIZE = 16384 + tag = 0 CDC_CMDS = { @@ -336,7 +338,8 @@ def close(self, reset=False): 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