Sfoglia il codice sorgente

feat: enrich simulated transmit summary details

tags/v0.4.0-pre
Jan Svabenik 1 mese fa
parent
commit
0b912b8626
3 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. +1
    -1
      docs/README.md
  2. +1
    -1
      internal/app/sim.go
  3. +3
    -0
      internal/app/sim_test.go

+ 1
- 1
docs/README.md Vedi File

@@ -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



+ 1
- 1
internal/app/sim.go Vedi File

@@ -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 {


+ 3
- 0
internal/app/sim_test.go Vedi File

@@ -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)
}


Loading…
Annulla
Salva