예제 #1
0
        /// <summary>
        /// Main update event for RAW data
        /// </summary>
        private void engine_EmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
        {
            //EmoState
            _es = e.emoState;

            //Fetch latest sensor data from engine
            Dictionary <EdkDll.EE_DataChannel_t, double[]> data = _engine.GetData((uint)_userID);

            //Update statusbar
            statusBar.Text        = "EPOC Headset Connected";
            statusStrip.BackColor = System.Drawing.Color.ForestGreen;

            try
            {
                if (data != null)
                {
                    //Update raw sensor graph
                    updateGraphSeries_Sensors(data);

                    //If recording is enabled...
                    if (this._recording)
                    {
                        for (int i = 0; i < data[EdkDll.EE_DataChannel_t.F3].Length; i++)
                        {
                            //Append raw sensor data (The whole buffer)
                            _ondra.AppendRawData(data[EdkDll.EE_DataChannel_t.AF3][i],
                                                 data[EdkDll.EE_DataChannel_t.F7][i],
                                                 data[EdkDll.EE_DataChannel_t.F3][i],
                                                 data[EdkDll.EE_DataChannel_t.FC5][i],
                                                 data[EdkDll.EE_DataChannel_t.T7][i],
                                                 data[EdkDll.EE_DataChannel_t.P7][i],
                                                 data[EdkDll.EE_DataChannel_t.O1][i],
                                                 data[EdkDll.EE_DataChannel_t.O2][i],
                                                 data[EdkDll.EE_DataChannel_t.P8][i],
                                                 data[EdkDll.EE_DataChannel_t.T8][i],
                                                 data[EdkDll.EE_DataChannel_t.FC6][i],
                                                 data[EdkDll.EE_DataChannel_t.F4][i],
                                                 data[EdkDll.EE_DataChannel_t.F8][i],
                                                 data[EdkDll.EE_DataChannel_t.AF4][i]);
                        }
                    }
                }
            }
            catch
            { }
        }
예제 #2
0
        /// <summary>
        /// Main update event for RAW data
        /// </summary>
        private void engine_EmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
        {
            //EmoState
            _es = e.emoState;

            //Fetch latest sensor data from engine
            _data = _engine.GetData((uint)_userID);

            //If recording is enabled...
            try
            {
                if (this._data != null)
                {
                    //If recording is enabled...
                    if (this._recording)
                    {
                        for (int i = 0; i < _data[EdkDll.EE_DataChannel_t.F3].Length; i++)
                        {
                            //Append raw sensor data (The whole buffer)
                            temp.AppendRawData(_data[EdkDll.EE_DataChannel_t.AF3][i],
                                               _data[EdkDll.EE_DataChannel_t.F7][i],
                                               _data[EdkDll.EE_DataChannel_t.F3][i],
                                               _data[EdkDll.EE_DataChannel_t.FC5][i],
                                               _data[EdkDll.EE_DataChannel_t.T7][i],
                                               _data[EdkDll.EE_DataChannel_t.P7][i],
                                               _data[EdkDll.EE_DataChannel_t.O1][i],
                                               _data[EdkDll.EE_DataChannel_t.O2][i],
                                               _data[EdkDll.EE_DataChannel_t.P8][i],
                                               _data[EdkDll.EE_DataChannel_t.T8][i],
                                               _data[EdkDll.EE_DataChannel_t.FC6][i],
                                               _data[EdkDll.EE_DataChannel_t.F4][i],
                                               _data[EdkDll.EE_DataChannel_t.F8][i],
                                               _data[EdkDll.EE_DataChannel_t.AF4][i]);

                            //Update time display
                            Time_Label.Content = _stopwatch.Elapsed.ToString("mm\\:ss");
                        }
                    }
                }
            }
            catch
            { }
        }