Skip to content

[DRAFT - DO NOT MERGE] Acknowledge simulator serial output for flow control - #1404

Closed
microbit-robert wants to merge 1 commit into
mainfrom
serial-output-flow-control
Closed

microbit-robert wants to merge 1 commit into
mainfrom
serial-output-flow-control

Conversation

@microbit-robert

Copy link
Copy Markdown
Collaborator

Opt in to the simulator's serial flow control via config and acknowledge serial output from xterm's write callback. The simulator then sends output as fast as the terminal can write it, rather than at the device's baud rate, and a busy program can't get ahead of the terminal. Output discarded while the terminal is unmounted is still acknowledged so the simulator doesn't wait.

Temporarily points the simulator at the serial-output-flow-control review build for testing. Remove before merge.

Refs #1242

Opt in to the simulator's serial flow control via config and acknowledge
serial output from xterm's write callback. The simulator then sends
output as fast as the terminal can write it, rather than at the device's
baud rate, and a busy program can't get ahead of the terminal. Output
discarded while the terminal is unmounted is still acknowledged so the
simulator doesn't wait.

Temporarily points the simulator at the serial-output-flow-control
review build for testing. Remove before merge.

Refs #1242
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Comment on lines +49 to +50
// TODO: remove before merge, once the simulator is released.
const branch: string | undefined = "serial-output-flow-control";

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Flagging TODO

@microbit-robert

Copy link
Copy Markdown
Collaborator Author

@microbit-matt-hillsdon Can be reviewed, but not merged until the TODO is actioned. Also helpful to wait until the simulator PRs are in, but in reality, the worst case seems to be that we send extra things to the simulator that it ignores.

@microbit-robert

Copy link
Copy Markdown
Collaborator Author

Closing in favour of microbit-foundation/micropython-microbit-v2-simulator#138 in isolation which works well in testing and no API change is required.

@microbit-robert
microbit-robert deleted the serial-output-flow-control branch November 11, 2026 11:26
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.

1 participant