Make the matrix frame rate configurable

24 fps costs about 11% of one core on a Zero 2 W, measured on the board. That
is a reasonable default for something you look at, but it is a decorative load
sharing a 512 MB machine with the forecaster, so it should be the owner's
choice. server.led_fps is clamped to 4..30.

Particle fall speed now divides by the configured rate rather than the module
constant, so rain falls at the same real-world speed whatever the frame rate,
instead of slowing down when you turn the frame rate down.
This commit is contained in:
2026-08-15 23:04:05 +01:00
parent 30944c2978
commit e05667d75b
3 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ async def lifespan(app: FastAPI):
station.sample_once()
station.start()
if CONFIG.server.led_enabled:
display = LedDisplay(station, CONFIG.server.led_cycle_s)
display = LedDisplay(station, CONFIG.server.led_cycle_s, CONFIG.server.led_fps)
display.start()
try:
yield