fix: continue to debug and fix strt amd waveform weirdness
This commit is contained in:
+12
-5
@@ -1366,11 +1366,13 @@ def _decode_a5_waveform(
|
||||
cumulative global byte offset; at each new frame, the starting alignment
|
||||
within the T,V,L,M cycle is (global_offset % 8).
|
||||
|
||||
Confirmed sizes from 4-2-26 (A5[0..8], skipping A5[7] metadata frame
|
||||
and A5[9] terminator):
|
||||
Confirmed sizes from 4-2-26 blast capture (A5[0..8], metadata at A5[7]):
|
||||
Frame 0: 934B Frame 1: 963B Frame 2: 946B Frame 3: 960B
|
||||
Frame 4: 952B Frame 5: 946B Frame 6: 941B Frame 8: 992B
|
||||
— none are multiples of 8.
|
||||
NOTE: Metadata frame position is variable — at fi==7 for blast events
|
||||
(4-2-26 capture) and fi==6 for desk-thump events (2026-04-14 confirmed).
|
||||
The dynamic b"Project:" detection handles both cases.
|
||||
|
||||
── Modifies event in-place. ─────────────────────────────────────────────────
|
||||
"""
|
||||
@@ -1454,9 +1456,14 @@ def _decode_a5_waveform(
|
||||
wave[:24].hex(' '),
|
||||
)
|
||||
|
||||
# Frame 7 carries event-time metadata strings ("Project:", "Client:", …)
|
||||
# and no waveform ADC data.
|
||||
elif fi == 7:
|
||||
# Metadata frame: contains "Project:", "Client:", etc. strings.
|
||||
# Originally assumed to be always fi==7 (A5[7] in 4-2-26 blast capture),
|
||||
# but confirmed variable position — it appears at whatever chunk index the
|
||||
# device places it (observed at fi=6 for desk-thump events 2026-04-14).
|
||||
# Skip ANY frame whose raw bytes contain b"Project:" — this is the same
|
||||
# anchor used by stop_after_metadata in read_bulk_waveform_stream.
|
||||
elif b"Project:" in w:
|
||||
log.info("_decode_a5_waveform: fi=%d skipped (metadata frame)", fi)
|
||||
continue
|
||||
|
||||
# Terminator frames have page_key=0x0000 and are excluded upstream
|
||||
|
||||
Reference in New Issue
Block a user