From 3abc3f3b524751c4a938e4168378ba117f2a7334 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Fri, 23 Jan 2026 13:34:34 +0100 Subject: [PATCH] usb/sagas: Don't reset USB device. This operation does not work on Windows, and does not appear to be crucial on other platforms either. The browser seems to already handle resetting the endpoints as needed when connecting or closing the browser (at least on Linux) --- src/usb/sagas.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/usb/sagas.ts b/src/usb/sagas.ts index 3e9ae654..80323e28 100644 --- a/src/usb/sagas.ts +++ b/src/usb/sagas.ts @@ -151,16 +151,6 @@ function* handleUsbConnectPybricks(hotPlugDevice?: USBDevice): Generator { exitStack.push(() => usbDevice.close().catch(console.debug)); - // Always reset the USB device to ensure it is in a known state. - const [, resetErr] = yield* call(() => maybe(usbDevice.reset())); - if (resetErr) { - // TODO: show error message to user here - console.error('Failed to reset USB device:', resetErr); - yield* put(usbDidFailToConnectPybricks()); - yield* cleanup(); - return; - } - const [, selectErr] = yield* call(() => maybe(usbDevice.selectConfiguration(1))); if (selectErr) { // TODO: show error message to user here