mirror of https://github.com/rusefi/rusefi.git
EPIC: Improve toolset for default tune canned tune generation #4871
This commit is contained in:
parent
8c016642a3
commit
bc811f3d9d
|
@ -43,6 +43,7 @@ void setHyundaiPb() {
|
|||
engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->globalTriggerAngleOffset = 90;
|
||||
|
||||
engineConfiguration->enableSoftwareKnock = true;
|
||||
engineConfiguration->etbIdleThrottleRange = 6.0;
|
||||
|
||||
engineConfiguration->totalGearsCount = 5;
|
||||
|
|
|
@ -46,7 +46,7 @@ static void setDefaultHPFP() {
|
|||
#endif
|
||||
|
||||
// todo: would be nice for unit tests to be happy about these defaults
|
||||
#if EFI_PROD_CODE
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
engineConfiguration->hpfpPumpVolume = 0.290;
|
||||
#endif
|
||||
engineConfiguration->hpfpMinAngle = 10;
|
||||
|
|
|
@ -43,12 +43,12 @@ public class CurveData implements HoHo {
|
|||
return null;
|
||||
ArrayIniField field = (ArrayIniField) iniField;
|
||||
int curveSize = field.getRows();
|
||||
BufferedReader r = TS2C.readAndScroll(msqFileName, curveName + "\"", TS2C.fileFactory);
|
||||
float[] curveValues = new float[curveSize];
|
||||
try {
|
||||
try (BufferedReader r = TS2C.readAndScroll(msqFileName, curveName + "\"", TS2C.fileFactory)) {
|
||||
readAxle(curveValues, r);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IllegalStateException("While " + curveName, e);
|
||||
// we read potentially old tune using current IniFileModel, curve dimension might not match
|
||||
System.err.println("[NumberFormatException] while " + curveName);
|
||||
}
|
||||
|
||||
return new CurveData(curveName, curveValues);
|
||||
|
|
|
@ -46,8 +46,12 @@ public class TableData implements HoHo {
|
|||
table[rowIndex] = new float[columns];
|
||||
}
|
||||
|
||||
BufferedReader reader = TS2C.readAndScroll(msqFileName, tableName, factory);
|
||||
try (BufferedReader reader = TS2C.readAndScroll(msqFileName, tableName, factory)) {
|
||||
readTable(table, reader, rows, columns);
|
||||
} catch (IllegalStateException e) {
|
||||
// we read potentially old tune using current IniFileModel, curve dimension might not match
|
||||
System.err.println("[IllegalStateException] while " + tableName);
|
||||
}
|
||||
return new TableData(rows, columns, table, tableName);
|
||||
}
|
||||
|
||||
|
|
|
@ -125,9 +125,10 @@ public class TuneCanTool {
|
|||
}
|
||||
|
||||
String fileName = REPORTS_OUTPUT_FOLDER + "/" + vehicleName + ".md";
|
||||
log.info("Writing to " + fileName);
|
||||
File outputFile = new File(fileName);
|
||||
log.info("Writing to " + outputFile.getAbsolutePath());
|
||||
|
||||
try (FileWriter w = new FileWriter(fileName)) {
|
||||
try (FileWriter w = new FileWriter(outputFile)) {
|
||||
w.append("# " + vehicleName + "\n\n");
|
||||
w.append("// canned tune " + cannedComment + "\n\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue