Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Added an error message if a repeated USB address is seen #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IvanSanchez
Copy link
Contributor

This is a (more) proper attempt to work around the serial port timeouts and Open (SetCommState): File not found issues on win7 on a particular family of laptops.

The error message should just bubble up to the nrf-connect-core log viewer.

_onUsbDetach(usbDevice) {
debug(`Called _triggerReenumeration because of detached USB device VID/PID 0x${
usbDevice.deviceDescriptor.idVendor.toString(16).padStart(4, '0')}/0x${
usbDevice.deviceDescriptor.idProduct.toString(16).padStart(4, '0')}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could consider using one of the hexpad4() or getDeviceId() functions from util/usb.js.

usbDevice.deviceDescriptor.idVendor.toString(16).padStart(4, '0')}/0x${
usbDevice.deviceDescriptor.idProduct.toString(16).padStart(4, '0')}`);

this._triggerReenumeration(usbDevice)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon here. Looks like a npm run lintfix is needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants