void Driver_OnCommandReceived(object sender, GeccoDriverArgs e) { if (e.Info == InfoEnum.PulseDisabled) { _pulseDoneEvent.Set(); } }
private void Driver_OnCommandReceived(object sender, GeccoDriverArgs e) { if (e.Info == InfoEnum.GeneratorError) { Application.Current.Dispatcher.BeginInvoke(new Action(() => Errors.Insert(0, new GeneratorErrorModel()))); } }
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(); } }
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); } })); } }