/// <summary>
 /// 开始硬件
 /// </summary>
 private void OnStartHD()
 {
     hd = new HDRead();
     if (hd.StartDriver())
     {
         isStart               = true;
         HRVReadTimer          = new System.Windows.Threading.DispatcherTimer();
         HRVReadTimer.Tick    += new EventHandler(OnTimerHRV);
         HRVReadTimer.Interval = new TimeSpan(0, 0, 0, 0, 125);
         HRVReadTimer.Start();
     }
 }
Ejemplo n.º 2
0
 private bool enabledDevice()
 {
     hd = new HDRead();
     if (hd.StartDriver())
     {
         HRVReadTimer          = new DispatcherTimer();
         HRVReadTimer.Tick    += new EventHandler(OnTimerHRV);
         HRVReadTimer.Interval = new TimeSpan(0, 0, 0, 0, 125);
         HRVReadTimer.Start();
         isStart = true;
         return(true);
     }
     System.Diagnostics.Debug.Write("开始设备失败\n");
     return(false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 开始HRV测量
 /// </summary>
 private void OnStartHrvToFlash()
 {
     hd = new HDRead();
     if (hd.StartDriver())
     {
         HRVReadTimer          = new DispatcherTimer();
         HRVReadTimer.Tick    += new EventHandler(OnTimerHRV);
         HRVReadTimer.Interval = new TimeSpan(0, 0, 0, 0, 20);//20毫秒
         HRVReadTimer.Start();
         isStart = true;
     }
     else
     {
         System.Diagnostics.Debug.Write("开始设备失败\n");
     }
 }