Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test startup timeout issues in usb tool on Mac and Windows #50

Open
jeffstjean opened this issue Apr 12, 2022 · 0 comments
Open

Test startup timeout issues in usb tool on Mac and Windows #50

jeffstjean opened this issue Apr 12, 2022 · 0 comments

Comments

@jeffstjean
Copy link
Member

In usb/usb_tool.js, the startup() routine is invoked through a setTimeout when a new USB device is added. Determine if this issue exists on platforms other than MacOS (Windows, Linux) and see if there's a cleaner solution to the issue.

usbDetect.on('add', function(usb_port) { 
    if ((usb_port.manufacturer.toLowerCase().includes('arduino')) || 
            usb_port.manufacturer.toLowerCase().includes('teensyduino')) {
                // usb-detection seems to discover devices before SerialPort has access to them
                // not the prettiest solution but adding a small delay resolves these issues on Mac
                // TODO: test to see if these issues occur on Windows and Linux
                setTimeout(startup, 500);
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant