Exemple #1
0
        public RadioModel()
        {
            AvailableRadio = Radio <G313Radio> .Find <G313RadioInfoProvider>().List().ToArray();

            Limits = new G313RadioLimits(null);

            Settings = SettingsModel.LoadOrCreate();
            Settings.Initialize();
            Memory = Memorizer.LoadOrCreate();

            Debug = new DebugModel(null);
        }
Exemple #2
0
        public void Initialize(int index)
        {
            if (AvailableRadio == null || AvailableRadio.Length == 0)
            {
                return;
            }

            var info = AvailableRadio[index];

            Radio  = info.Open <G313Radio>();
            Limits = new G313RadioLimits(Radio);
            Debug  = new DebugModel(Radio);

            IfFile    = "If.wav";
            AudioFile = "audio.wav";

            IfMp3File    = "If.mp3";
            AudioMp3File = "audio.mp3";

            //var scanner = Radio.BlockScanner();
            //scanner.FrequencyScanned += (s, ee) => Debug.Print("frequency:{0}, power:{1}, raw:{2}", ee.Frequency, (ee.Strength * 1000 / 255 - 1300) / 10, ee.Strength);
            //scanner.ScanFinished += (s, ee) => Debug.Print("finished.");
        }