ESP32-style dedicated progress screen for STM32 self-update#566
Merged
Conversation
The Hapax STM32 self firmware-update still drew its progress over the menu via fw_gui_progress_update() (an 'Update progress: NN %' text line + bitmap slider strip), unlike the ESP32 update which got a clean dedicated screen. bl_flash_app() now renders a full-screen view that mirrors the ESP32 one: a cleared screen with a 'Firmware Update' title, a 'Do not power off' warning, a centered 'Erasing flash...' status during the erase phase, and a framed percentage bar that redraws only when the integer %% changes. Progress math is extracted to fw_update_progress_percent() in the new pure header m1_fw_progress.h (guards total==0, clamps remainder>total) with regression tests in tests/test_fw_progress.c. fw_gui_progress_update() is left intact — it is still used by the ESP32 backup-flash path.
hapaxx11
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
During a STM32 (Hapax) firmware self-update, the progress was drawn on top of
the menu — an
Update progress: NN %text line plus a bitmap slider strip inan info box — while the ESP32 update (#555) already renders on a clean dedicated
screen.
This change gives the self-update the same treatment. When
bl_flash_app()starts, it draws a dedicated full-screen progress view:
shown on the same dedicated screen (replacing the old hourglass overlay).
percentage, on its own screen — no menu underneath.
chunks don't trigger a screen flush each and slow the update.
failed!", press OK) is unchanged.
The progress-percentage math is extracted into a pure, host-testable helper
fw_update_progress_percent()(m1_csrc/m1_fw_progress.h).fw_gui_progress_update()is intentionally left in place — it is still used bythe ESP32 backup-flash path (
m1_esp32_fw_update.c); this change only stops theSTM32 self-update from using it.
Type of Change
Hardware Requirements
Testing Environment
How Has This Been Tested?
renders on a clean dedicated screen (title + "Do not power off"), shows
"Erasing flash…" during erase, then the framed bar fills smoothly, and the
"Update complete!" reboot dialog appears at the end.
tests/test_fw_progress.c,7 cases: start=0, done=100, mid values, total=0 guard, remainder>total
clamp, real image size). Full suite: 98/98 pass.
Checklist: