From 5181f377039c7f8fdd77b730a000a2adfbb1914b Mon Sep 17 00:00:00 2001 From: kascade Date: Fri, 11 Apr 2008 20:31:43 +0000 Subject: [PATCH] maf/injector scaler update git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@30 38686702-15cf-42e4-a595-3071df8bf5ea --- .../ui/tab/injector/InjectorControlPanel.java | 20 +++++++++---------- .../ecu/ui/tab/maf/MafControlPanel.java | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/enginuity/logger/ecu/ui/tab/injector/InjectorControlPanel.java b/src/enginuity/logger/ecu/ui/tab/injector/InjectorControlPanel.java index f950ba46..011eb5fc 100644 --- a/src/enginuity/logger/ecu/ui/tab/injector/InjectorControlPanel.java +++ b/src/enginuity/logger/ecu/ui/tab/injector/InjectorControlPanel.java @@ -361,9 +361,9 @@ public final class InjectorControlPanel extends JPanel { updateButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { try { - Table1D table = getInjectorFlowTable(ecuEditor); - if (table != null) { - if (showUpdateTableConfirmation("Injector Flow Scaling") == OK_OPTION) { + if (showUpdateTableConfirmation("Injector Flow Scaling") == OK_OPTION) { + Table1D table = getInjectorFlowTable(ecuEditor); + if (table != null) { DataCell[] cells = table.getData(); if (cells.length == 1) { if (isNumber(flowScaling)) { @@ -374,9 +374,9 @@ public final class InjectorControlPanel extends JPanel { showMessageDialog(parent, "Injector Flow Scaling value invalid.", "Error", ERROR_MESSAGE); } } + } else { + showMessageDialog(parent, "Injector Flow Scaling table not found.", "Error", ERROR_MESSAGE); } - } else { - showMessageDialog(parent, "Injector Flow Scaling table not found.", "Error", ERROR_MESSAGE); } } catch (Exception e) { String msg = e.getMessage() != null && e.getMessage().length() > 0 ? e.getMessage() : "Unknown"; @@ -392,9 +392,9 @@ public final class InjectorControlPanel extends JPanel { updateButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { try { - Table2D table = getInjectorLatencyTable(ecuEditor); - if (table != null) { - if (showUpdateTableConfirmation("Injector Latency") == OK_OPTION) { + if (showUpdateTableConfirmation("Injector Latency") == OK_OPTION) { + Table2D table = getInjectorLatencyTable(ecuEditor); + if (table != null) { DataCell[] cells = table.getData(); if (isNumber(latencyOffset)) { for (DataCell cell : cells) { @@ -405,9 +405,9 @@ public final class InjectorControlPanel extends JPanel { } else { showMessageDialog(parent, "Injector Latency Offset value invalid.", "Error", ERROR_MESSAGE); } + } else { + showMessageDialog(parent, "Injector Latency table not found.", "Error", ERROR_MESSAGE); } - } else { - showMessageDialog(parent, "Injector Latency table not found.", "Error", ERROR_MESSAGE); } } catch (Exception e) { String msg = e.getMessage() != null && e.getMessage().length() > 0 ? e.getMessage() : "Unknown"; diff --git a/src/enginuity/logger/ecu/ui/tab/maf/MafControlPanel.java b/src/enginuity/logger/ecu/ui/tab/maf/MafControlPanel.java index 9220079c..b8a15370 100644 --- a/src/enginuity/logger/ecu/ui/tab/maf/MafControlPanel.java +++ b/src/enginuity/logger/ecu/ui/tab/maf/MafControlPanel.java @@ -320,9 +320,9 @@ public final class MafControlPanel extends JPanel { updateMafButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { try { - Table2D table = getMafTable(ecuEditor); - if (table != null) { - if (showUpdateMafConfirmation() == OK_OPTION) { + if (showUpdateMafConfirmation() == OK_OPTION) { + Table2D table = getMafTable(ecuEditor); + if (table != null) { if (isValidRange(mafvMin, mafvMax)) { DataCell[] axisCells = table.getAxis().getData(); double[] x = new double[axisCells.length]; @@ -343,9 +343,9 @@ public final class MafControlPanel extends JPanel { } else { showMessageDialog(parent, "Invalid MAFv range specified.", "Error", ERROR_MESSAGE); } + } else { + showMessageDialog(parent, "MAF Sensor Scaling table not found.", "Error", ERROR_MESSAGE); } - } else { - showMessageDialog(parent, "MAF Sensor Scaling table not found.", "Error", ERROR_MESSAGE); } } catch (Exception e) { String msg = e.getMessage() != null && e.getMessage().length() > 0 ? e.getMessage() : "Unknown";