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

Close serial port connection before flashing firmware #688

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-firmware-upload
Dec 15, 2021

Conversation

Copy link
Contributor

@AlbyIanna AlbyIanna commented Dec 14, 2021

Fixes #684

per1234 reacted with thumbs up emoji
Copy link
Contributor Author

This PR fixes the issue (you can flash the firmware when the serial monitor/plotter is open), but a little problem remains: when you flash the firmware to a board, the sketch on the board is replaced with the code necessary to do the update, so re-opening the serial port is pretty much pointless. I wonder if this impacts the experience
cc: @per1234 @ubidefeo

Copy link
Contributor

per1234 commented Dec 15, 2021

re-opening the serial port is pretty much pointless. I wonder if this impacts the experience

I don't think so. The reason is that if I am working with the Serial Monitor before doing a firmware update, I am likely to want to go back to working with Serial Monitor again after. So it is convenient for Serial Monitor to remain open, even though there will be no output until I have uploaded my sketch again.

The firmware updater already displays a warning about the sketch being overwritten, so the user shouldn't be surprised to find that no output is arriving in the Serial Monitor. However, they would find it confusing to see the "Not connected" banner persist in Serial Monitor after finishing a firmware update, since that could give the impression that something is wrong.

AlbyIanna reacted with thumbs up emoji

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 #684 for me. Thanks @AlbyIanna!

`${firmware.module}@${firmware.firmware_version}`,
]);
this.serialService.uploadInProgress = true;
await this.serialService.disconnect();
Copy link
Contributor

@kittaakos kittaakos Dec 15, 2021

Choose a reason for hiding this comment

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

Maybe, you can move this into the try block. If disconnect fails, the IDE won't stuck in the uploadInProgress state. What do you think? Just a proposal, though.

Copy link
Contributor Author

@AlbyIanna AlbyIanna Dec 15, 2021

Choose a reason for hiding this comment

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

Makes sense! Thanks, @kittaakos!

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

+2 more reviewers

@kittaakos kittaakos kittaakos left review comments

@fstasi fstasi fstasi approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Firmware update fails if Serial Monitor is open

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