Stop presenting stale data as live, and back off broken devices

- readings.py: PowerReadings.total now sums the known parts (None only when
  nothing is known), with a complete property saying whether it under-counts;
  the snapshot exposes it as partial and the web UI marks it with a tilde.
- display/service.py: telemetry older than 15 s is drawn as -- instead of
  re-rendering frozen readings as if they were current.
- sensors.py: Commander PRO last-known RPMs expire after 10 s instead of
  feeding the power model forever (empty list = unknown); a runtime MSR
  failure backs off 15 s instead of re-opening PawnIO every second; GPU NVML
  reconnects back off 10 s instead of nvmlInit() every second, and the
  sample-buffer timestamp resets on a driver-reset reconnect.
- control.py: CpuTemperature read failures back off 15 s instead of churning
  the MSR handle every poll.
This commit is contained in:
paul committed 2026-12-05 16:54:01 +13:00
1 parent 538a464257
commit 9036c6e734
6 files changed
+46 -7

No files matched your search

+1 -1
View File
@@ -123,7 +123,7 @@ class Telemetry:
"vram_used": None if s.vram is None else s.vram[0],
"vram_total": None if s.vram is None else s.vram[1]},
"power": {"cpu": _r(s.power.cpu), "gpu": _r(s.power.gpu), "other": _r(s.power.other),
"total": _r(s.power.total),
"total": _r(s.power.total), "partial": not s.power.complete,
"parts": {k: round(v, 1) for k, v in s.power.parts.items()}},
"row": s.row(),
}