Skip to content

Fix WebUSB serial#55

Merged
microbit-matt-hillsdon merged 5 commits into
mainfrom
fix-serial
Apr 2, 2025
Merged

Fix WebUSB serial#55
microbit-matt-hillsdon merged 5 commits into
mainfrom
fix-serial

Conversation

@microbit-grace

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

Copy link
Copy Markdown
Contributor

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/

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

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 thread lib/usb.ts
Comment on lines +486 to +489
// Prevent starting serial when flashing.
if (!this.flashing) {
this.startSerialInternal();
}

Copy link
Copy Markdown
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.

Comment thread lib/usb.ts Outdated
@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

@microbit-robert microbit-robert left a comment

Copy link
Copy Markdown
Contributor

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
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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