Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix monitor service id creation #1025

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
AlbyIanna merged 1 commit into main from fix-monitor-id
Jun 8, 2022
Merged

Fix monitor service id creation #1025

AlbyIanna merged 1 commit into main from fix-monitor-id
Jun 8, 2022

Conversation

Copy link
Contributor

@AlbyIanna AlbyIanna commented Jun 8, 2022

Motivation

This PR solves an issue that happens when uploading a sketch to some boards when the serial port is open.

Some boards need configuration parameters to append to the fqbn during the upload:
https://github.com/arduino/arduino-ide/blob/main/arduino-ide-extension/src/browser/contributions/upload-sketch.ts#L216-L219

and this is messing up with the MonitorManager because when notifyUploadStarted() is called, the monitor ID won't match the MonitorService instance that handles the serial connection:
https://github.com/arduino/arduino-ide/blob/main/arduino-ide-extension/src/node/monitor-manager.ts#L114-L119

Change description

Add some logic to make sure only the first part of an fqbn is relevant when creating a monitorID
https://github.com/arduino/arduino-ide/compare/fix-monitor-id?expand=1#diff-cf90510ad3f811b7073a1934f11698463693bf446a2521eb2a55f27a48328427R218-R220

Other information

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

This fixes the issue for me. Great work @AlbyIanna!

AlbyIanna reacted with rocket emoji
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jun 8, 2022
@AlbyIanna AlbyIanna merged commit 726628e into main Jun 8, 2022
@AlbyIanna AlbyIanna deleted the fix-monitor-id branch June 8, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@per1234 per1234 per1234 approved these changes

+1 more reviewer

@fstasi fstasi fstasi approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /