private void UpdateChartData() { var readLength = _channel.TotalLength < _indexChart.DrawableSize.Width ? _channel.TotalLength : _indexChart.DrawableSize.Width; if (readLength <= 0) { return; } var offset = _channel.TotalLength - readLength; var data = _channel.ReadData(offset, readLength); _indexChart.IndicesData = data; if (_channel.Mode == EegIndexMode.LeftSide) { _indexChart.ChannelName = "T3O1"; } else if (_channel.Mode == EegIndexMode.RightSide) { _indexChart.ChannelName = "T4O2"; } else { _indexChart.ChannelName = "Artifacts"; } _indexChart.LastIndexTime = _channel.TotalLength; //(int)(DateTime.Now - _startTime).TotalMilliseconds; //_channel.TotalLength; }
private void UpdateChartData() { var readLength = _channel.TotalLength < _indexChart.DrawableSize.Width ? _channel.TotalLength : _indexChart.DrawableSize.Width; if (readLength <= 0) { return; } var offset = _channel.TotalLength - readLength; var data = _channel.ReadData(offset, readLength); _indexChart.IndicesData = data; }