示例#1
0
文件: MainForm.cs 项目: shyul/TestFSQ
        /*
         * private async Task SpecAnRefresh()
         * {
         *  await ......
         *  if (!SpecAn.IsRefreshing) SpecAn.IsRefreshing = true;
         *  while (!CancelSpecAnRefresh.IsCancellationRequested)
         *  {
         *      Thread.Sleep(10);
         *      SpecAn.GetTraceData(Program.SpectrumTable, 1);
         *  }
         * }*/

        private void SpecAnRefreshWorker()
        {
            if (!SpecAn.IsRefreshing)
            {
                SpecAn.IsRefreshing = true;
            }
            while (!CancelSpecAnRefresh.IsCancellationRequested)
            {
                Thread.Sleep(10);
                SpecAn.GetTraceData(Program.SpectrumTable, 1);
            }
        }
示例#2
0
文件: MainForm.cs 项目: shyul/TestFSQ
        private void BtnAutoFindFSQ_Click(object sender, EventArgs e)
        {
            if (SpecAn.IsRefreshing)
            {
                SpecAn.IsRefreshing = false;
            }

            //Console.WriteLine("Center = " + SpecAn.SetCenterFreq(2802236583.2145587487));
            //Console.WriteLine("Span = " + SpecAn.SetSpanFreq(63256489.85225522266));
            SpecAn.CenterFrequency = 2802236583.2145587487;
            SpecAn.SpanFrequency   = 63256489.85225522266;
            Thread.Sleep(100);

            SpecAn.GetTraceData(Program.SpectrumTable, 1);

            //result.ForEach(n => Console.WriteLine(n.freq + " | " + n.value));
        }