Skip to content

Wait for post partial flash disconnect in connect#91

Merged
microbit-grace merged 6 commits intoappsfrom
post-pf-disconnect
Feb 13, 2026
Merged

Wait for post partial flash disconnect in connect#91
microbit-grace merged 6 commits intoappsfrom
post-pf-disconnect

Conversation

@microbit-grace
Copy link
Contributor

@microbit-grace microbit-grace commented Feb 12, 2026

This reduces partial flashing time. The waitForDisconnect after partial flashing has been moved to connect. Most of the time, the disconnect can happen in the background, except when connecting straight after partial flashing. The disconnect interferes with connecting on Android.

CreateAI project hex (https://makecode.microbit.org/_Am7dq0bLKh90) is added as a Capacitor app file option for testing purposes. We can close this opened PR if this one gets merged.

The Capacitor app has been updated to include a 'Connect' and 'Disconnect' button. Live accelerometer data is displayed if available and connected.

To test in the Capacitor app

  1. Select "Data Collection (new, just works)".
  2. Tap "Flash .hex file" and go through the flow.
  3. Straight after flashing, quickly tap "Finished" and then "Connect".
  4. Wait for the Connection status to get updated to "Connecting...". It take a while because it's waiting for post partial flashing disconnect before attempting to connect.
  5. Wait for Connection status to get updated to "Connected" and see the live accelerometer data get shown.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 12, 2026

Deploying microbit-connection with  Cloudflare Pages  Cloudflare Pages

Latest commit: a08b4fd
Status:🚫  Build failed.

View logs

@microbit-grace microbit-grace changed the base branch from createai-hex to apps February 12, 2026 17:14
@microbit-grace microbit-grace marked this pull request as ready for review February 12, 2026 17:18
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Choose a reason for hiding this comment

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

LGTM. The error case isn't really practical to trigger as discussed but tried for a disconnect to keep things in a consistent state.

@microbit-grace microbit-grace merged commit 0dc9655 into apps Feb 13, 2026
3 of 4 checks passed
@microbit-grace microbit-grace deleted the post-pf-disconnect branch February 13, 2026 12:12
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.

2 participants