mirror of https://github.com/rusefi/RomRaider.git
maf/injector scaler update
git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@31 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
parent
5181f37703
commit
43322c0f76
|
@ -9,6 +9,7 @@ import enginuity.logger.ecu.ui.DataRegistrationBroker;
|
|||
import enginuity.logger.ecu.ui.tab.XYTrendline;
|
||||
import enginuity.maps.DataCell;
|
||||
import enginuity.maps.Rom;
|
||||
import enginuity.maps.Table;
|
||||
import enginuity.maps.Table1D;
|
||||
import enginuity.maps.Table2D;
|
||||
import static enginuity.util.ParamChecker.checkNotNull;
|
||||
|
@ -455,19 +456,23 @@ public final class InjectorControlPanel extends JPanel {
|
|||
}
|
||||
|
||||
private Table1D getInjectorFlowTable(ECUEditor ecuEditor) {
|
||||
try {
|
||||
Rom rom = ecuEditor.getLastSelectedRom();
|
||||
return (Table1D) rom.getTable("Injector Flow Scaling");
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
Table1D table = getTable(ecuEditor, "Injector Flow Scaling");
|
||||
if (table == null) return getTable(ecuEditor, "Injector Flow Scaling ");
|
||||
return table;
|
||||
}
|
||||
|
||||
private Table2D getInjectorLatencyTable(ECUEditor ecuEditor) {
|
||||
Table2D table = getTable(ecuEditor, "Injector Latency");
|
||||
if (table == null) return getTable(ecuEditor, "Injector Latency ");
|
||||
return table;
|
||||
}
|
||||
|
||||
private <T extends Table> T getTable(ECUEditor ecuEditor, String tableName) {
|
||||
try {
|
||||
Rom rom = ecuEditor.getLastSelectedRom();
|
||||
return (Table2D) rom.getTable("Injector Latency");
|
||||
return (T) rom.getTable(tableName);
|
||||
} catch (Exception e) {
|
||||
LOGGER.warn("Error getting " + tableName + " table", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import enginuity.logger.ecu.ui.DataRegistrationBroker;
|
|||
import enginuity.logger.ecu.ui.tab.XYTrendline;
|
||||
import enginuity.maps.DataCell;
|
||||
import enginuity.maps.Rom;
|
||||
import enginuity.maps.Table;
|
||||
import enginuity.maps.Table2D;
|
||||
import static enginuity.util.ParamChecker.checkNotNull;
|
||||
import org.apache.log4j.Logger;
|
||||
|
@ -393,11 +394,17 @@ public final class MafControlPanel extends JPanel {
|
|||
}
|
||||
|
||||
private Table2D getMafTable(ECUEditor ecuEditor) {
|
||||
Table2D table = getTable(ecuEditor, "MAF Sensor Scaling");
|
||||
if (table == null) return getTable(ecuEditor, "MAF Sensor Scaling ");
|
||||
return table;
|
||||
}
|
||||
|
||||
private <T extends Table> T getTable(ECUEditor ecuEditor, String tableName) {
|
||||
try {
|
||||
Rom rom = ecuEditor.getLastSelectedRom();
|
||||
return (Table2D) rom.getTable("MAF Sensor Scaling");
|
||||
return (T) rom.getTable(tableName);
|
||||
} catch (Exception e) {
|
||||
LOGGER.warn("Error getting MAF table", e);
|
||||
LOGGER.warn("Error getting " + tableName + " table", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue