debug: figuring out whats wrong with waveform viewer

This commit is contained in:
2026-04-14 16:00:14 -04:00
parent 0da88ec6aa
commit 4f4c1a8f64
3 changed files with 118 additions and 88 deletions
+8
View File
@@ -191,6 +191,14 @@ rectime_seconds = int(round((total_samples - pretrig_samples) / sample_rate))
`_decode_a5_waveform` uses `sample_rate=1024` as a default; the server overrides with
`compliance_config.sample_rate` when available. Do NOT use `strt[18]` for rectime.
**Sanity check — pretrig_samples must be less than total_samples:**
If `pretrig_samples >= total_samples` the STRT parse is invalid. Possible causes:
DLE-stuffed `0x10` byte within prev_key4 or key4 shifted field offsets, or a different
STRT record variant. `_decode_a5_waveform` logs `raw strt[0:21]` at WARNING level and
clamps `pretrig_samples = 0` so the viewer renders (showing the full waveform from t=0).
Observed once (2026-04-14) with `strt[16:18] = 0x41 0x01` → pretrig=16641 (impossible).
Root cause not yet identified — capture the warning log hex dump to diagnose.
### SUB 5A — end-of-stream signal (confirmed 2026-04-06)
After streaming all waveform chunks, the device sends exactly **1 raw byte** in response to