Skip to content

Fix WebUSB serial #55

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Apr 2, 2025
Merged

Fix WebUSB serial #55

merged 5 commits into from
Apr 2, 2025

Conversation

microbit-grace
Copy link
Contributor

@microbit-grace microbit-grace commented Apr 1, 2025

Issue fixed: microbit-foundation/python-editor-v3#1209

  • reinstate serial after flashing to fix starting of serial after flashing (main issue and possibly related issue 1)
  • don't start serial when flashing to fix flashing issues (possibly related issue 2)

To test changes in Python Editor
Draft PR: microbit-foundation/python-editor-v3#1211
Preview url: https://review-python-editor-v3.microbit.org/fix-serial/

To test changes in CreateAI
Draft PR: microbit-foundation/ml-trainer#593
Preview url: https://review-createai.microbit.org/update-conn-lib/

Copy link

cloudflare-workers-and-pages bot commented Apr 2, 2025

Deploying microbit-connection with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6328124
Status: ✅  Deploy successful!
Preview URL: https://bb4305ef.microbit-connection.pages.dev
Branch Preview URL: https://fix-serial.microbit-connection.pages.dev

View logs

Comment on lines +486 to +489
// Prevent starting serial when flashing.
if (!this.flashing) {
this.startSerialInternal();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This prevents serial from starting when flashing is in progress in the Python Editor. Adding event listener in device hook in the python editor causes serial to get started in the flashing process.

@microbit-grace microbit-grace changed the title [WIP - DO NOT MERGE] Fix WebUSB serial Fix WebUSB serial Apr 2, 2025
@microbit-grace microbit-grace marked this pull request as ready for review April 2, 2025 13:02
Copy link
Contributor

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

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

LGTM!

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit 4f77bcf into main Apr 2, 2025
4 checks passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the fix-serial branch April 2, 2025 14:19
microbit-grace added a commit to microbit-foundation/python-editor-v3 that referenced this pull request Apr 2, 2025
microbit-grace added a commit to microbit-foundation/ml-trainer that referenced this pull request Apr 2, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show serial does not immediately show either print() output or error traceback
3 participants