only:Improve toolset for default tune canned tune generation #4871
This commit is contained in:
parent
fc467b9493
commit
ed6c4880a0
|
@ -39,7 +39,7 @@ public class TuneCanTool {
|
||||||
RootHolder.ROOT = "../firmware/";
|
RootHolder.ROOT = "../firmware/";
|
||||||
|
|
||||||
handle("Mitsubicha", 1258);
|
handle("Mitsubicha", 1258);
|
||||||
handle("Scion 1NZ-FE", 1448);
|
handle("Scion-1NZ-FE", 1448);
|
||||||
handle("4g93", 1425);
|
handle("4g93", 1425);
|
||||||
handle("BMW-mtmotorsport", 1479);
|
handle("BMW-mtmotorsport", 1479);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class TuneCanTool {
|
||||||
StringBuilder sb = TuneCanTool.getTunePatch(simulatorDefaultTune, custom, ini);
|
StringBuilder sb = TuneCanTool.getTunePatch(simulatorDefaultTune, custom, ini);
|
||||||
|
|
||||||
FileWriter w = new FileWriter(reportsFolder + "/" + vehicleName + ".md");
|
FileWriter w = new FileWriter(reportsFolder + "/" + vehicleName + ".md");
|
||||||
w.append("# " + vehicleName + "\n");
|
w.append("# " + vehicleName + "\n\n");
|
||||||
w.append("Tune " + url + "\n\n");
|
w.append("Tune " + url + "\n\n");
|
||||||
|
|
||||||
w.append("```\n");
|
w.append("```\n");
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class TuneTools {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static String getAssignmentCode(Constant defaultValue, String name, String value) {
|
public static String getAssignmentCode(Constant defaultValue, String name, String value) {
|
||||||
return "\t // default " + defaultValue.getValue() + "\n" +
|
return " // default " + defaultValue.getValue() + "\n" +
|
||||||
"\tengineConfiguration->" + name + " = " + value + ";\n";
|
" engineConfiguration->" + name + " = " + value + ";\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,72 +28,72 @@ public class LoadOlderTuneTest {
|
||||||
|
|
||||||
StringBuilder sb = TuneCanTool.getTunePatch(lessOldDefaultTune, customOldTune, ini);
|
StringBuilder sb = TuneCanTool.getTunePatch(lessOldDefaultTune, customOldTune, ini);
|
||||||
|
|
||||||
assertEquals("\t // default \"Single Coil\"\n" +
|
assertEquals(" // default \"Single Coil\"\n" +
|
||||||
"\tengineConfiguration->ignitionMode = IM_ONE_COIL;\n" +
|
" engineConfiguration->ignitionMode = IM_ONE_COIL;\n" +
|
||||||
"\t // default 4.0\n" +
|
" // default 4.0\n" +
|
||||||
"\tengineConfiguration->cylindersCount = 4;\n" +
|
" engineConfiguration->cylindersCount = 4;\n" +
|
||||||
"\t // default 1000.0\n" +
|
" // default 1000.0\n" +
|
||||||
"\tengineConfiguration->tps1SecondaryMin = 0.0;\n" +
|
" engineConfiguration->tps1SecondaryMin = 0.0;\n" +
|
||||||
"\t // default 0.0\n" +
|
" // default 0.0\n" +
|
||||||
"\tengineConfiguration->tps1SecondaryMax = 1000.0;\n" +
|
" engineConfiguration->tps1SecondaryMax = 1000.0;\n" +
|
||||||
"\t // default 1000.0\n" +
|
" // default 1000.0\n" +
|
||||||
"\tengineConfiguration->tps2SecondaryMin = 0.0;\n" +
|
" engineConfiguration->tps2SecondaryMin = 0.0;\n" +
|
||||||
"\t // default 0.0\n" +
|
" // default 0.0\n" +
|
||||||
"\tengineConfiguration->tps2SecondaryMax = 1000.0;\n" +
|
" engineConfiguration->tps2SecondaryMax = 1000.0;\n" +
|
||||||
"\t // default 5.0\n" +
|
" // default 5.0\n" +
|
||||||
"\tengineConfiguration->throttlePedalSecondaryUpVoltage = 0.0;\n" +
|
" engineConfiguration->throttlePedalSecondaryUpVoltage = 0.0;\n" +
|
||||||
"\t // default 65.0\n" +
|
" // default 65.0\n" +
|
||||||
"\tengineConfiguration->mc33_hvolt = 0.0;\n" +
|
" engineConfiguration->mc33_hvolt = 0.0;\n" +
|
||||||
"\t // default 13000.0\n" +
|
" // default 13000.0\n" +
|
||||||
"\tengineConfiguration->mc33_i_boost = 0.0;\n" +
|
" engineConfiguration->mc33_i_boost = 0.0;\n" +
|
||||||
"\t // default 9400.0\n" +
|
" // default 9400.0\n" +
|
||||||
"\tengineConfiguration->mc33_i_peak = 0.0;\n" +
|
" engineConfiguration->mc33_i_peak = 0.0;\n" +
|
||||||
"\t // default 3700.0\n" +
|
" // default 3700.0\n" +
|
||||||
"\tengineConfiguration->mc33_i_hold = 0.0;\n" +
|
" engineConfiguration->mc33_i_hold = 0.0;\n" +
|
||||||
"\t // default 400.0\n" +
|
" // default 400.0\n" +
|
||||||
"\tengineConfiguration->mc33_t_max_boost = 0.0;\n" +
|
" engineConfiguration->mc33_t_max_boost = 0.0;\n" +
|
||||||
"\t // default 10.0\n" +
|
" // default 10.0\n" +
|
||||||
"\tengineConfiguration->mc33_t_peak_off = 0.0;\n" +
|
" engineConfiguration->mc33_t_peak_off = 0.0;\n" +
|
||||||
"\t // default 700.0\n" +
|
" // default 700.0\n" +
|
||||||
"\tengineConfiguration->mc33_t_peak_tot = 0.0;\n" +
|
" engineConfiguration->mc33_t_peak_tot = 0.0;\n" +
|
||||||
"\t // default 10.0\n" +
|
" // default 10.0\n" +
|
||||||
"\tengineConfiguration->mc33_t_bypass = 0.0;\n" +
|
" engineConfiguration->mc33_t_bypass = 0.0;\n" +
|
||||||
"\t // default 60.0\n" +
|
" // default 60.0\n" +
|
||||||
"\tengineConfiguration->mc33_t_hold_off = 0.0;\n" +
|
" engineConfiguration->mc33_t_hold_off = 0.0;\n" +
|
||||||
"\t // default 10000.0\n" +
|
" // default 10000.0\n" +
|
||||||
"\tengineConfiguration->mc33_t_hold_tot = 0.0;\n" +
|
" engineConfiguration->mc33_t_hold_tot = 0.0;\n" +
|
||||||
"\t // default \"PULLUP\"\n" +
|
" // default \"PULLUP\"\n" +
|
||||||
"\tengineConfiguration->clutchDownPinMode = 1.0;\n" +
|
" engineConfiguration->clutchDownPinMode = 1.0;\n" +
|
||||||
"\t // default \"PULLUP\"\n" +
|
" // default \"PULLUP\"\n" +
|
||||||
"\tengineConfiguration->clutchUpPinMode = 1.0;\n" +
|
" engineConfiguration->clutchUpPinMode = 1.0;\n" +
|
||||||
"\t // default 410.0\n" +
|
" // default 410.0\n" +
|
||||||
"\tengineConfiguration->mapErrorDetectionTooHigh = 250.0;\n" +
|
" engineConfiguration->mapErrorDetectionTooHigh = 250.0;\n" +
|
||||||
"\t // default 3.0\n" +
|
" // default 3.0\n" +
|
||||||
"\tengineConfiguration->idleStepperReactionTime = 10.0;\n" +
|
" engineConfiguration->idleStepperReactionTime = 10.0;\n" +
|
||||||
"\t // default 200.0\n" +
|
" // default 200.0\n" +
|
||||||
"\tengineConfiguration->idleStepperTotalSteps = 150.0;\n" +
|
" engineConfiguration->idleStepperTotalSteps = 150.0;\n" +
|
||||||
"\t // default \"true\"\n" +
|
" // default \"true\"\n" +
|
||||||
"\tengineConfiguration->stepperForceParkingEveryRestart = false;\n" +
|
" engineConfiguration->stepperForceParkingEveryRestart = false;\n" +
|
||||||
"\t // default -20.0\n" +
|
" // default -20.0\n" +
|
||||||
"\tengineConfiguration->idlerpmpid_iTermMin = -200.0;\n" +
|
" engineConfiguration->idlerpmpid_iTermMin = -200.0;\n" +
|
||||||
"\t // default 20.0\n" +
|
" // default 20.0\n" +
|
||||||
"\tengineConfiguration->idlerpmpid_iTermMax = 200.0;\n" +
|
" engineConfiguration->idlerpmpid_iTermMax = 200.0;\n" +
|
||||||
"\t // default 300.0\n" +
|
" // default 300.0\n" +
|
||||||
"\tengineConfiguration->idlePidRpmUpperLimit = 0.0;\n" +
|
" engineConfiguration->idlePidRpmUpperLimit = 0.0;\n" +
|
||||||
"\t // default 5.0\n" +
|
" // default 5.0\n" +
|
||||||
"\tengineConfiguration->idlePidDeactivationTpsThreshold = 2.0;\n" +
|
" engineConfiguration->idlePidDeactivationTpsThreshold = 2.0;\n" +
|
||||||
"\t // default 0.0\n" +
|
" // default 0.0\n" +
|
||||||
"\tengineConfiguration->warningPeriod = 10.0;\n" +
|
" engineConfiguration->warningPeriod = 10.0;\n" +
|
||||||
"\t // default \"false\"\n" +
|
" // default \"false\"\n" +
|
||||||
"\tengineConfiguration->isHip9011Enabled = true;\n" +
|
" engineConfiguration->isHip9011Enabled = true;\n" +
|
||||||
"\t // default 0.0\n" +
|
" // default 0.0\n" +
|
||||||
"\tengineConfiguration->hip9011PrescalerAndSDO = 6.0;\n" +
|
" engineConfiguration->hip9011PrescalerAndSDO = 6.0;\n" +
|
||||||
"\t // default 20.0\n" +
|
" // default 20.0\n" +
|
||||||
"\tengineConfiguration->knockDetectionWindowStart = 35.0;\n" +
|
" engineConfiguration->knockDetectionWindowStart = 35.0;\n" +
|
||||||
"\t // default 60.0\n" +
|
" // default 60.0\n" +
|
||||||
"\tengineConfiguration->knockDetectionWindowEnd = 135.0;\n" +
|
" engineConfiguration->knockDetectionWindowEnd = 135.0;\n" +
|
||||||
"\t // default \"false\"\n" +
|
" // default \"false\"\n" +
|
||||||
"\tengine", sb.substring(0, 2200));
|
" engineConfiguration->is_enabled_spi_3 = t", sb.substring(0, 2400));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalStateException.class)
|
@Test(expected = IllegalStateException.class)
|
||||||
|
|
Loading…
Reference in New Issue