Ejemplo n.º 1
0
 void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.PulseDisabled)
     {
         _pulseDoneEvent.Set();
     }
 }
Ejemplo n.º 2
0
 private void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.GeneratorError)
     {
         Application.Current.Dispatcher.BeginInvoke(new Action(() => Errors.Insert(0, new GeneratorErrorModel())));
     }
 }
Ejemplo n.º 3
0
 void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.FirmwareUpdate)
     {
         var arguments = e.Message.Split(';');
         _commandLength = byte.Parse(arguments[0]);
         byte commandResponse = byte.Parse(arguments[1]);
         _commandSuccess = commandResponse == 6;
         _ackTrigger.Set();
     }
 }
Ejemplo n.º 4
0
 private void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.PulseDisabled)
     {
         Application.Current.Dispatcher.Invoke(new Action(() =>
         {
             PulseMeasurements.Insert(0, new PulseMeasurement {
                 Date = DateTime.Now, Points = e.MeasurePoints
             });
             if (PulseMeasurements.Count > 100)
             {
                 PulseMeasurements.RemoveAt(PulseMeasurements.Count - 1);
             }
         }));
     }
 }