From 89da97c6370748b2902a673604c1fa50a1d30097 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Wed, 24 Jun 2026 04:03:01 -0700 Subject: [PATCH] debug: log raw message content to journal --- scripts/led-matrix-viz.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/led-matrix-viz.py b/scripts/led-matrix-viz.py index 19d2dab..a67deca 100644 --- a/scripts/led-matrix-viz.py +++ b/scripts/led-matrix-viz.py @@ -104,10 +104,17 @@ def main(): pass while b";" in buf: - msg, buf = buf.split(b";", 1) - msg = msg.decode().strip() + raw_msg, buf = buf.split(b";", 1) + msg = raw_msg.decode().strip() parts = msg.split() - if len(parts) >= 3 and parts[0] == "midi": + if not parts: + continue + if parts[0] != "midi": + print(f"[viz] skipping: {msg!r}", flush=True) + continue + if len(parts) < 3: + print(f"[viz] too short: {parts}", flush=True) + continue status = int(parts[1]) note = int(parts[2]) vel = int(parts[3]) if len(parts) >= 4 else 0