Beispiel #1
0
 private void PlotRaw(TaskScheduler uiScheduler)
 {
     foreach (var value in rawQueue.GetConsumingEnumerable())
     {
         ECGSample sample = new ECGSample(value.Index, value.Value);
         Task.Factory.StartNew(() =>
         {
             if (sample.Index % plotFrequency == 0)
             {
                 if (followIncomingData)
                     rawDataGraph.ChartAreas[0].AxisX.ScaleView.Scroll(rawDataGraph.ChartAreas[0].AxisX.Maximum);
                 rawDataGraph.Series[0].Points.AddXY(sample.Index, sample.Value);
             }
         }, CancellationToken.None, TaskCreationOptions.None, uiScheduler);
     }
 }
Beispiel #2
0
 private void PlotDetectedQRS(TaskScheduler uiScheduler)
 {
     foreach (var value in detectedQRSQueue.GetConsumingEnumerable())
     {
         ECGSample qrs = new ECGSample(value.Index, value.Value);
         Task.Factory.StartNew(() =>
         {
             //hrSignalGraph.Series[1].Points.AddXY(qrs.Index, 1 / qrs.Value);
             rawDataGraph.Series[1].Points.AddXY(qrs.Index, 1 / qrs.Value);
         }, CancellationToken.None, TaskCreationOptions.None, uiScheduler);
     }
 }