maf/injector scaler update

git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@30 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
kascade 2008-04-11 20:31:43 +00:00
parent e4fe3c4ffa
commit 5181f37703
2 changed files with 15 additions and 15 deletions

View File

@ -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";

View File

@ -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";