Skip to content

Commit f751d1f

Browse files
committed
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.
1 parent ac0ee39 commit f751d1f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/usb/sagas.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,6 @@ function* handleUsbConnectPybricks(hotPlugDevice?: USBDevice): Generator {
156156

157157
exitStack.push(() => usbDevice.close().catch(console.debug));
158158

159-
// Always reset the USB device to ensure it is in a known state.
160-
const [, resetErr] = yield* call(() => maybe(usbDevice.reset()));
161-
if (resetErr) {
162-
// TODO: show error message to user here
163-
console.error('Failed to reset USB device:', resetErr);
164-
yield* put(usbDidFailToConnectPybricks());
165-
yield* cleanup();
166-
return;
167-
}
168-
169159
const [, selectErr] = yield* call(() => maybe(usbDevice.selectConfiguration(1)));
170160
if (selectErr) {
171161
// TODO: show error message to user here

0 commit comments

Comments
 (0)