Skip to content

Add example: discover all boards and batch-update firmware with progress bars - #16

Open
mullinmax wants to merge 2 commits into
mainfrom
claude/wizardly-ramanujan-wlrh2a
Open

Add example: discover all boards and batch-update firmware with progress bars#16
mullinmax wants to merge 2 commits into
mainfrom
claude/wizardly-ramanujan-wlrh2a

Conversation

@mullinmax

Copy link
Copy Markdown
Contributor

Adds examples/update_all_boards.py, a runnable script that:

  1. Discovers every Vector board on the LAN via warpedpinball.discover().
  2. Checks each board's /api/update/check concurrently and lists which boards have an update available, are up to date, or are unreachable.
  3. Asks for a single y/N confirmation, then applies the updates to all out-of-date boards concurrently. Each board gets its own line with a live progress bar ([#####----] 42% plus the latest streamed log message), driven by the {"log", "percent"} records from Machine.apply_update(progress=...).

The per-board progress display is a small lock-protected class that redraws all lines in place with ANSI cursor-up/erase-line escapes, falling back to plain sequential prints when stdout isn't a TTY. A board that fails mid-update shows FAILED: ... on its own line without affecting the others.

Also documents the new example in docs/examples.md (table entry plus a walkthrough section), matching the style of the existing examples.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NF3RCp3snkLzcdDFdzmM1u


Generated by Claude Code

…gress bars

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NF3RCp3snkLzcdDFdzmM1u
@github-actions

Copy link
Copy Markdown

Coverage report

Total coverage: 100.00% (0.00% vs base 100.00%)

@mullinmax
mullinmax marked this pull request as ready for review July 18, 2026 19:39
…curately

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NF3RCp3snkLzcdDFdzmM1u
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