private void Update()   // Loop set to Update to get dynamic graphs
        {
            lineChart.Reset();  // Cleans the chart
            ConfigChart();

            /*
             * // Read CSV
             * var values = csvFltr.readEMGCSV("EMG_data.csv");
             * int[] PodData = values.Item1;
             */

            // Don't read EMG from CSV, retrieve variable directly
            // int[] PodData = ThalmicMyo.storeEMG07.ToArray();
            List <int> PodData = StoreEMG.storeEMG07;


            // Moving Avg Filter
            fr = 5;    // Define the framesize of your block average window

            if (PodData.Count > fr)
            {
                DataFltr csvFltr = new DataFltr();
                avg_emg_Pod07.Add(csvFltr.MovingAvg(fr, PodData));     // Elapsed time for all MovingAvg (fr 10): 4 ms for 6,900 rows --> x2.45 = 9.8 ms

                // Plot data
                AddChartData(avg_emg_Pod07);
            }
        }
        private void Update()   // Loop set to Update to get dynamic graphs
        {
            List <int> PodData = StoreEMG.storeEMG03;

            // Moving Avg Filter
            fr = 5;    // Define the framesize of your block average window

            if (PodData.Count > fr)
            {
                DataFltr csvFltr = new DataFltr();
                avg_emg_Pod03.Add(csvFltr.MovingAvg(fr, PodData));     // Elapsed time for all MovingAvg (fr 10): 4 ms for 6,900 rows --> x2.45 = 9.8 ms
            }
        }
Ejemplo n.º 3
0
        private void Update()   // Loop set to Update to get dynamic graphs
        {
            lineChart.Reset();  // Cleans the chart
            ConfigChart();

            List <int> PodData = StoreEMG.storeEMG01;

            // Moving Avg Filter
            fr = 5;    // Define the framesize of your block average window

            if (PodData.Count > fr)
            {
                DataFltr csvFltr = new DataFltr();
                avg_emg_Pod01.Add(csvFltr.MovingAvg(fr, PodData));     // Elapsed time for all MovingAvg (fr 10): 4 ms for 6,900 rows --> x2.45 = 9.8 ms

                // Plot data
                AddChartData(avg_emg_Pod01);
            }
        }