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)
This commit is contained in:
Laurens Valk
2026-01-24 16:16:02 -06:00
committed by David Lechner
parent 7a415e7c85
commit 3abc3f3b52
-10
View File
@@ -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