From b14f31f3b03a7b80e15aaa7899d8371b30865b33 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Apr 2026 20:48:10 +0000 Subject: [PATCH] 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 --- seismo_lab.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/seismo_lab.py b/seismo_lab.py index c1fbd3d..dc96d59 100644 --- a/seismo_lab.py +++ b/seismo_lab.py @@ -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")