- Severity: Medium
- Where:
src/libs/matrix.ts(drawState, ~line 53) - Problem: The PNG branch returns before the heartbeat-timeout check, so any
panel configured with an image drops out of the global
NO / HEART / BEAT / :(display. With the current default, observer is panel 3 (:(), so the alarm message is silently broken exactly when a heartbeat is lost. - Action: Decide precedence — let a heartbeat timeout override the image (recommended), or document that image panels intentionally stay static during an outage.
- Severity: Medium
- Where:
package.json,install.txt,src/libs/matrix.ts(getImages) - Problem:
canvas@2pulls cairo/pango/libjpeg.install.txtonly installsbuild-essential, so a freshnpm installon the Pi may fail to build the native module when no prebuilt ARM binary is available. - Action: Either (a) add the apt deps to
install.txt/README (libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev), or (b) replacecanvaswith a pure-JS PNG decoder (e.g.pngjs) plus a nearest-neighbor scale, since only raw RGBA + scaling is needed.
- Severity: Low
- Where:
src/libs/matrix.ts(drawState, ~lines 55-57) - Problem:
matrix.fgColor()is called for every lit pixel every frame (up to 1024/panel). The rpi-led-matrix docs notesetPixelhas per-pixel overhead and batch ops are preferred. - Action: Sort cached pixels by color and only call
fgColorwhen the color changes. Minor at ~5 fps, but free.