private void OltProtocolOnOnDiagUpdate(object sender, EventArgs eventArgs) { var diagData = oltProtocol.GetDiagData(); uiContext.Send( delegate { rtGridPanel.DiagDataUpdate(diagData); }, null); }
private void Prepare(OltProtocol oltProtocol) { this.oltProtocol = oltProtocol; var errors = oltProtocol.ReadErrors().ToArray(); var errorStatus = ECUErrorFactory.DecodingErrorStatus(oltProtocol.GetDiagData().ErrorStatus); savedError.Items.Clear(); savedError.Items.AddRange(errors); activeError.Items.Clear(); activeError.Items.AddRange(errorStatus); }
private void oltProtocol_OnDiagUpdate(object sender, EventArgs e) { var diagData = OltProtocol.GetDiagData(); diagData.LC1_AFR = LambdaAdapter.AFR; diagData.LC1_ALF = LambdaAdapter.Lambda; dataKeeper.diagDataList.Add(diagData); dataLogger.WriteData(diagData); firmwareManager.Add(diagData); if (OltProtocol.IsEcuErrorFound && settings.AutoClearErrors) { OltProtocol.ClearErrors(); } }