fix(protocol): enable full_waveform for continuous mode.

This commit is contained in:
2026-04-23 16:24:39 -04:00
parent 39ebd4bdaa
commit 5e2f3bf2a1
+7 -6
View File
@@ -885,12 +885,13 @@ def device_event_blastware_file(
def _do(): def _do():
with _build_client(port, baud, host, tcp_port, timeout=120.0) as client: with _build_client(port, baud, host, tcp_port, timeout=120.0) as client:
info = client.connect() info = client.connect()
# Use full_waveform=False (stop_after_metadata=True) — downloads until # Use full_waveform=True (stop_after_metadata=False) — downloads until
# "Project:" is found in the 5A stream, which covers the compliance # the device signals natural end-of-stream. For simple Continuous /
# metadata section. For simple Continuous/Single-Shot mode events this # Single-Shot events this gives byte-identical content to BW.
# produces the correct body content. Histogram+Continuous mode requires # NOTE: Histogram+Continuous mode produces extra embedded STRT records
# different handling (TODO: handle multi-mode events). # (session data from preceding histogram intervals bleeds into the 5A
events = client.get_events(full_waveform=False, stop_after_index=index) # stream) — handle that mode separately once basic waveform is correct.
events = client.get_events(full_waveform=True, stop_after_index=index)
matching = [ev for ev in events if ev.index == index] matching = [ev for ev in events if ev.index == index]
return matching[0] if matching else None, info return matching[0] if matching else None, info
ev, info = _run_with_retry(_do, is_tcp=_is_tcp(host)) ev, info = _run_with_retry(_do, is_tcp=_is_tcp(host))