feat: enhance waveform viewer with unit info display and event selection functionality

This commit is contained in:
Brian Harrison
2026-04-03 15:08:57 -04:00
parent 23e4febba6
commit e4730376ad
3 changed files with 191 additions and 38 deletions

View File

@@ -427,14 +427,12 @@ def device_event_waveform(
def _do():
with _build_client(port, baud, host, tcp_port) as client:
info = client.connect()
events = client.get_events()
# full_waveform=True fetches the complete 5A stream inside the
# 1E→0A→0C→5A→1F loop. Issuing a second 5A after 1F times out.
events = client.get_events(full_waveform=True)
matching = [ev for ev in events if ev.index == index]
if not matching:
return None, None, info
ev = matching[0]
client.download_waveform(ev)
return ev, events, info
ev, events, info = _run_with_retry(_do, is_tcp=_is_tcp(host))
return matching[0] if matching else None, info
ev, info = _run_with_retry(_do, is_tcp=_is_tcp(host))
except HTTPException:
raise
except ProtocolError as exc: