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

Multiple usb fix #1045

Merged
merged 2 commits into from
Oct 21, 2016
Merged

Multiple usb fix #1045

merged 2 commits into from
Oct 21, 2016

Conversation

HipsterBrown
Copy link
Contributor

Fixes #850

Smoke Test:

  • Connect 2 Tessels to computer via USB
  • Run a command for Tessel, like t2 wifi
  • Should see a prompt to pick one of the 2 Tessels connected to your computer
hipsterbrown:t2-cli (multiple-usb-fix) $ t2 wifi
INFO Looking for your Tessel...
INFO Which Tessel do want to use?
    USB Tessel-02A3B3DCF2D8
    USB tessel-router
|   Exit \

else if (!opts.name && tessel.usbConnection !== undefined && !opts.lanPrefer) {
// Finish early with this Tessel
finishSearchEarly(tessel);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this condition should stay intact, only skipping finishSearchEarly(tessel); if there are more than one attached?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this function is executed every time the seeker discovers a Tessel, either over LAN or USB depending on the options, how do we know if more than one Tessel is attached via USB without continuing to seek after the first event?

The finishSearchEarly only works, in my opinion, in cases where we definitely know there should be only one Tessel discovered, like when a name is specified.

@rwaldron
Copy link
Contributor

Smoke test passed!

@rwaldron rwaldron merged commit ce46cf0 into master Oct 21, 2016
@HipsterBrown HipsterBrown deleted the multiple-usb-fix branch June 26, 2017 17:26
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

Successfully merging this pull request may close these issues.

2 Tessels plugged in, CLI can find both but one of them hangs
2 participants