Improve toolset for default tune canned tune generation #4871

This commit is contained in:
rusefillc 2023-03-27 14:45:50 -04:00
parent eff74fa5d1
commit 1c7781449d
2 changed files with 9 additions and 3 deletions

View File

@ -38,8 +38,8 @@ public class IniFileModel {
private String currentSection;
private String currentYBins;
private String currentXBins;
private final Map<String, String> xBinsByZBins = new HashMap<>();
private final Map<String, String> yBinsByZBins = new HashMap<>();
private final Map<String, String> xBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
private final Map<String, String> yBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
public static void main(String[] args) {
log.info("Dialogs: " + IniFileModel.getInstance().dialogs);
@ -194,6 +194,10 @@ public class IniFileModel {
return xBinsByZBins.get(tableName);
}
public Set<String> getTables() {
return xBinsByZBins.keySet();
}
public String getYBin(String tableName) {
return yBinsByZBins.get(tableName);
}

View File

@ -32,7 +32,9 @@ public class TuneReadWriteTest {
@Test
public void testIniReader() {
IniFileModel model = IniFileModel.getInstance();
assertEquals("fuelRpmBins", model.getXBin("fuelTable"));
assertTrue(model.getTables().contains("fueltable"));
assertEquals(21, model.getTables().size());
assertEquals("fuelRpmBins", model.getXBin("FUELTable"));
assertEquals("fuelLoadBins", model.getYBin("fuelTable"));
}