Wideband autonomous SDR analysis engine forked from sdr-visual-suite
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

26 wiersze
766B

  1. package main
  2. import (
  3. "testing"
  4. "sdr-wideband-suite/internal/classifier"
  5. "sdr-wideband-suite/internal/pipeline"
  6. )
  7. func TestDecisionCanEnableRecorderFlags(t *testing.T) {
  8. rt := &dspRuntime{}
  9. rt.cfg.Recorder.Enabled = false
  10. rt.cfg.Recorder.AutoDecode = false
  11. policy := pipeline.Policy{AutoRecordClasses: []string{"WFM"}, AutoDecodeClasses: []string{"WFM"}}
  12. decision := pipeline.DecideSignalAction(policy, pipeline.Candidate{ID: 1, Hint: "WFM"}, &classifier.Classification{ModType: classifier.ClassWFM})
  13. if decision.ShouldRecord {
  14. rt.cfg.Recorder.Enabled = true
  15. }
  16. if decision.ShouldAutoDecode {
  17. rt.cfg.Recorder.AutoDecode = true
  18. }
  19. if !rt.cfg.Recorder.Enabled || !rt.cfg.Recorder.AutoDecode {
  20. t.Fatalf("expected recorder flags to be enabled")
  21. }
  22. }