8000 feature: Detect board port change after upload by cmaglie · Pull Request #2253 · arduino/arduino-cli · GitHub
[go: up one dir, main page]

Skip to content

feature: Detect board port change after upload #2253

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 18 commits into from
Aug 18, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed linter issue
  • Loading branch information
cmaglie committed Aug 9, 2023
commit 9f8d266cf3c0b57d5f6783268ef89e61d34097ad
4 changes: 2 additions & 2 deletions commands/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func runProgramAction(pme *packagemanager.Explorer,
// expected port change then run the detector.
updatedUploadPort := f.NewFuture[*rpc.Port]()
if uploadProperties.GetBoolean("upload.wait_for_upload_port") && watch != nil {
go detectUploadPort(port, watch, uploadCtx, updatedUploadPort)
go detectUploadPort(uploadCtx, port, watch, updatedUploadPort)
} else {
updatedUploadPort.Send(nil)
go f.DiscardCh(watch)
Expand Down Expand Up @@ -522,7 +522,7 @@ func runProgramAction(pme *packagemanager.Explorer,
return updatedUploadPort.Await(), nil
}

func detectUploadPort(uploadPort *rpc.Port, watch <-chan *rpc.BoardListWatchResponse, uploadCtx context.Context, result f.Future[*rpc.Port]) {
func detectUploadPort(uploadCtx context.Context, uploadPort *rpc.Port, watch <-chan *rpc.BoardListWatchResponse, result f.Future[*rpc.Port]) {
log := logrus.WithField("task", "port_detection")
log.Tracef("Detecting new board port after upload")

Expand Down

Footer

© 2025 GitHub, Inc.
0