From 0b912b86263ef908ac449974238b72ff5aee6493 Mon Sep 17 00:00:00 2001 From: Jan Svabenik Date: Thu, 2 Apr 2026 23:08:22 +0200 Subject: [PATCH] feat: enrich simulated transmit summary details --- docs/README.md | 2 +- internal/app/sim.go | 2 +- internal/app/sim_test.go | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index e49d12e..b0b6cc7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -62,7 +62,7 @@ The HTTP control plane also exposes `GET /dry-run` for quick inspection of the c ## Simulated transmit `--simulate-tx` runs the offline generator through the Soapy-oriented simulated backend path and writes an IQ-style artifact to disk. -This is the current closest no-hardware stand-in for the future transmit pipeline in the main application path. +The current summary includes backend, input source, frequency, and configured output sample rate. ## Offline generation diff --git a/internal/app/sim.go b/internal/app/sim.go index 0b413e5..a4952da 100644 --- a/internal/app/sim.go +++ b/internal/app/sim.go @@ -52,7 +52,7 @@ func RunSimulatedTransmit(cfg cfgpkg.Config, outPath string, duration time.Durat if err := backend.Flush(context.Background()); err != nil { return "", err } - return fmt.Sprintf("simulated transmit: backend=%s output=%s duration=%s input=%s", backend.Info().Name, outPath, duration, inputLabel(cfg)), nil + return fmt.Sprintf("simulated transmit: backend=%s output=%s duration=%s input=%s freq=%.1fMHz rate=%d", backend.Info().Name, outPath, duration, inputLabel(cfg), cfg.FM.FrequencyMHz, cfg.FM.CompositeRateHz), nil } func inputLabel(cfg cfgpkg.Config) string { diff --git a/internal/app/sim_test.go b/internal/app/sim_test.go index fe86b5c..1f55018 100644 --- a/internal/app/sim_test.go +++ b/internal/app/sim_test.go @@ -20,6 +20,9 @@ func TestRunSimulatedTransmit(t *testing.T) { if !strings.Contains(summary, "simulated transmit") { t.Fatalf("unexpected summary: %s", summary) } + if !strings.Contains(summary, "freq=") { + t.Fatalf("summary missing frequency: %s", summary) + } if info, err := os.Stat(out); err != nil || info.Size() == 0 { t.Fatalf("expected non-empty output file, err=%v", err) }