Include capture label in TCP raw filename

Matches serial bridge naming: raw_bw_{ts}_{label}.bin / raw_s3_{ts}_{label}.bin

https://claude.ai/code/session_014NczSHUz9uTzCAf4cVASTJ
This commit is contained in:
Claude
2026-04-27 20:48:10 +00:00
parent b9ab368934
commit b14f31f3b0
+4 -2
View File
@@ -479,8 +479,10 @@ class BridgePanel(tk.Frame):
logdir = self.logdir_var.get().strip() or "."
os.makedirs(logdir, exist_ok=True)
ts = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
bw_path = os.path.join(logdir, f"raw_bw_{ts}.bin")
s3_path = os.path.join(logdir, f"raw_s3_{ts}.bin")
safe_label = self._cap_label.replace(" ", "_") if self._cap_label else ""
suffix = f"_{safe_label}" if safe_label else ""
bw_path = os.path.join(logdir, f"raw_bw_{ts}{suffix}.bin")
s3_path = os.path.join(logdir, f"raw_s3_{ts}{suffix}.bin")
with self._tcp_cap_lock:
self._tcp_cap_bw_fh = open(bw_path, "wb")
self._tcp_cap_s3_fh = open(s3_path, "wb")