add the loading screen

This commit is contained in:
2026-03-12 23:52:07 +01:00
parent e80cea7bbf
commit bec76d6796
7 changed files with 218 additions and 5 deletions

View File

@@ -18,6 +18,8 @@ stateDiagram-v2
[*] --> Main
state "Main View<br>(timer + weight)" as Main
state "Menu<br>(carousel)" as Menu
state "Bluetooth Pairing<br>(waiting for connection)" as BTPairing
state "Recipe Selection<br>(carousel)" as RecipeSelection
state "Do Recipe<br>(step-by-step)" as DoRecipe
state "Edit Recipe<br>(step list)" as EditRecipe
@@ -26,8 +28,14 @@ stateDiagram-v2
state "Edit Step Value Entry<br>(morse input)" as ValueEntry
state "Edit Step Goal Time Entry<br>(morse input)" as GoalTime
Main --> Menu : both long press
Main --> RecipeSelection : right long press
Menu --> Main : left long press [back]
Menu --> BTPairing : right long press [BT Pair]
BTPairing --> Menu : left long press [cancel]
RecipeSelection --> Main : left long press
RecipeSelection --> DoRecipe : right long press [on recipe → run]
RecipeSelection --> EditRecipe : both long press [on recipe → edit]<br>or right long press [on + → add]
@@ -48,4 +56,28 @@ stateDiagram-v2
ValueEntry --> GoalTime : left long press [WEIGH_WITH_TIMER]
GoalTime --> EditRecipe : left long press [save]<br>or left press [cancel]
```
```
## Tools
### `export_loading_frames.py`
Renders the loading screen animation and exports every unique frame as both PNG files and a NumPy array.
**Usage**
```bash
uv run export_loading_frames.py [--out-dir <directory>]
```
| Argument | Default | Description |
|---|---|---|
| `--out-dir` | `frames/` | Directory to write output files into |
**Outputs**
| File | Description |
|---|---|
| `frames/frame_XXXX.png` | One PNG per unique frame, zero-padded index |
| `frames/frames.npy` | NumPy array of shape `(N, H, W)`, dtype `bool` |
Consecutive duplicate frames are collapsed so only visually distinct frames are exported. The script prints the total number of frames rendered and the number of unique frames kept.