Public Access
Add a PC renderer for the themed pages; fix overlapping layouts
tools/render_pages.py compiles the page code natively with g++ against ESPHome's own display and font code and the font bitmaps of the last `esphome compile`, and draws pages to PNG at chosen moments with sample data (normal, empty, alert, busy), as a contact sheet, or as one example per page in docs/images/pages (now shown in the README). Fixes found with it: Cyber HUD zone names ran into the temperatures, the breach header label hit the tag and the column marker the matrix label; KonoSuba subtitle, guild weather icon, cabbage text and all-day deadline, and hills through the party; Steins;Gate D-mail recipient, the microwave display, the gadget card value and world line labels; LCARS room rows, readout bars and data cascade, warp core readouts, and the captain's log weather wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
13a499fd97
commit
d2e81a5a36
27 files changed
+627
-38
No files matched your search
@@ -95,7 +95,7 @@ src/test_images/ test sketch: cycles through 12 test images (env esp32dev
|
||||
esphome/ el512-panel.yaml (Home Assistant display), el512-smoke.yaml
|
||||
home_assistant/packages/ el512_panel.yaml: helper sensors for the ESPHome pages
|
||||
tools/ import_still_alive.py, konosuba_sprites.py, steins_sprites.py,
|
||||
trek_sprites.py
|
||||
trek_sprites.py, render_pages.py (+ render/: PC renderer)
|
||||
test/ unit tests (placeholder)
|
||||
docs/ datasheet and notes
|
||||
```
|
||||
@@ -198,6 +198,11 @@ endorsed by Valve.
|
||||
|
||||
## Cyberpunk pages
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
Four animated ESPHome pages in a Cyberpunk look, drawn by
|
||||
[components/el512/cyberpunk.cpp](components/el512/cyberpunk.cpp) with Orbitron, Rajdhani
|
||||
and Share Tech Mono (Google Fonts). All of them take part in the rotation:
|
||||
@@ -224,6 +229,11 @@ with or endorsed by CD PROJEKT RED.
|
||||
|
||||
## KonoSuba pages
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
Four animated pages around the KonoSuba party, drawn by
|
||||
[components/el512/konosuba.cpp](components/el512/konosuba.cpp) with Cinzel, Nunito,
|
||||
Press Start 2P, Noto Sans JP and Dela Gothic One (Google Fonts), all in the rotation:
|
||||
@@ -256,6 +266,11 @@ affiliated with or endorsed by them.
|
||||
|
||||
## Steins;Gate pages
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
Four animated pages from the Future Gadget Lab, drawn by
|
||||
[components/el512/steins.cpp](components/el512/steins.cpp) with Nixie One, Special
|
||||
Elite and Noto Sans JP (plus fonts shared with the other themed pages), all in the
|
||||
@@ -282,6 +297,11 @@ from the series is used. Steins;Gate is © MAGES. and its other rights holders;
|
||||
|
||||
## Star Trek pages
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
Four animated pages aboard a Lower Decks-era ship, drawn by
|
||||
[components/el512/trek.cpp](components/el512/trek.cpp) with Antonio (standing in for
|
||||
the LCARS typeface), all in the rotation:
|
||||
@@ -309,6 +329,27 @@ These pages are fan art: the pixel art, layouts and texts are original, and no m
|
||||
from the series is used. Star Trek and Star Trek: Lower Decks are trademarks of CBS
|
||||
Studios Inc.; this project is not affiliated with or endorsed by them.
|
||||
|
||||
## Rendering pages on the PC
|
||||
|
||||
[tools/render_pages.py](tools/render_pages.py) draws the themed pages to PNG without
|
||||
the panel, to check layouts before flashing and to make the images above. It compiles
|
||||
the page code natively with g++ against ESPHome's own display and font code (from the
|
||||
installed `esphome` package) and the exact font bitmaps of the last `esphome compile`,
|
||||
so text sizes and positions match the device. Pages are drawn at chosen moments after
|
||||
they were shown, with sample data:
|
||||
|
||||
```bash
|
||||
esphome compile esphome/el512-panel-local.yaml # once, and after font changes
|
||||
python tools/render_pages.py # all pages -> .render/out
|
||||
python tools/render_pages.py --page st_lcars --at 0,2000 --scenario alert
|
||||
python tools/render_pages.py --scenario busy --sheet # long names, high values
|
||||
python tools/render_pages.py --scenario empty # no data yet
|
||||
python tools/render_pages.py --examples # docs/images/pages/*.png
|
||||
```
|
||||
|
||||
It needs a C++20 g++ (MinGW-w64 works on Windows) and Pillow. The host stand-in for
|
||||
the display and the sample data are in [tools/render/](tools/render/).
|
||||
|
||||
## Using the driver
|
||||
|
||||
```cpp
|
||||
|
||||
Reference in new issue
Block a user