Skip to content

Add detected port even if the board couldn't be recognized #411

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

Merged
merged 1 commit into from
Sep 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions commands/board/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,16 @@ func List(instanceID int32) ([]*rpc.DetectedPort, error) {
port.IdentificationPrefs.Get("pid"))
items, err := apiByVidPid(url)
if err == ErrNotFound {
// the board couldn't be detected, keep going with the next port
// the board couldn't be detected, print a warning
logrus.Debug("Board not recognized")
continue
} else if err != nil {
// this is bad, bail out
return nil, errors.Wrap(err, "error getting board info from Arduino Cloud")
}

// add a DetectedPort entry in any case: the `Boards` field will
// be empty but the port will be shown anyways (useful for 3rd party
// boards)
b = items
}

Expand Down