fix: survive the screen library's sys.exit, copy all modules into the image, fit -10 degree readouts

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
rickzkmandClaude Sonnet 5.5 committed 2026-10-22 13:38:37 +02:00
1 parent ae8c17d8d5
commit 09f78d1a63
8 files changed
+78 -8

No files matched your search

+5 -3
View File
@@ -19,7 +19,7 @@ Edit `VIEW:` in `docker-compose.yml`, commit, `git push`, press **Deploy** in Co
## Add a view
1. Write a module with a class that follows the `View` protocol in `view.py` (`start`, `stop`, `frame_key`,
1. Write a module (any `*.py` in the project root is copied into the image) with a class that follows the `View` protocol in `view.py` (`start`, `stop`, `frame_key`,
`render`, `patch`). Put anything slow (network, system reads) in a `Poller` so drawing never blocks.
2. Add one entry to `REGISTRY` in `registry.py`.
3. Add a line to the table above, a sample to `preview.py`, and tests.
@@ -58,8 +58,10 @@ else keeps working.
- **Upside-down:** this screen is mounted the opposite way to the bus board. Set `SCREEN_ORIENTATION` to
`REVERSE_LANDSCAPE`.
- **Blank screen:** `docker compose logs second-screen`. If it says the screen is not available it retries every 30 s;
check the cable and `ls -l /dev/serial/by-id/`. ModemManager can interfere (`systemctl status ModemManager`).
- **Blank screen:** `docker compose logs second-screen`. If the port cannot be opened the app retries every 30 s
(the screen library's own exit is caught); if the port disappears mid-run the app exits after about a minute of
failed draws and Docker restarts it. With the cable out *before* the container starts, Docker itself refuses to
start it (the compose `devices:` entry). Check the cable and `ls -l /dev/serial/by-id/`. ModemManager can interfere (`systemctl status ModemManager`).
- **`STARÉ` tag:** the data is old (weather older than 1 h, server stats older than 30 s). The clock keeps running.
- **Error screen at startup:** `VIEW` is not one of the valid views.