fix: update STRT parsing to extract additional bytes for total_samples and pretrig_samples
This commit is contained in:
@@ -1389,11 +1389,18 @@ def _decode_a5_waveform(
|
||||
#
|
||||
# NOTE: strt[8:10] is the LOWER 2 bytes of key4, NOT total_samples.
|
||||
# Confirmed from raw_rx capture (4-9-26): strt[14:16] = total_samples. ✅
|
||||
strt = w0[strt_pos : strt_pos + 21]
|
||||
# Extract 32 bytes so we can see past the first 21 — the true total_samples
|
||||
# and pretrig_samples offsets have not yet been confirmed and may be > +20.
|
||||
strt = w0[strt_pos : strt_pos + 32]
|
||||
if len(strt) < 21:
|
||||
log.warning("_decode_a5_waveform: STRT record truncated (%dB)", len(strt))
|
||||
return
|
||||
|
||||
log.info(
|
||||
"_decode_a5_waveform: STRT raw[0:32]: %s",
|
||||
strt[:32].hex(' '),
|
||||
)
|
||||
|
||||
total_samples = struct.unpack_from(">H", strt, 14)[0]
|
||||
pretrig_samples = struct.unpack_from(">H", strt, 16)[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user