mirror of https://github.com/rusefi/rusefi.git
EPIC: Improve toolset for default tune canned tune generation #4871
This commit is contained in:
parent
f218a025b2
commit
8c016642a3
|
@ -45,7 +45,11 @@ public class CurveData implements HoHo {
|
|||
int curveSize = field.getRows();
|
||||
BufferedReader r = TS2C.readAndScroll(msqFileName, curveName + "\"", TS2C.fileFactory);
|
||||
float[] curveValues = new float[curveSize];
|
||||
readAxle(curveValues, r);
|
||||
try {
|
||||
readAxle(curveValues, r);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IllegalStateException("While " + curveName, e);
|
||||
}
|
||||
|
||||
return new CurveData(curveName, curveValues);
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ public class TS2C {
|
|||
|
||||
Reader reader = factory.apply(fileName);
|
||||
BufferedReader br = new BufferedReader(reader);
|
||||
System.out.println("Reading from " + fileName + ", scrolling to " + magicStringKey);
|
||||
System.out.println("Reading from " + new File(fileName).getAbsolutePath() + ", scrolling to " + magicStringKey);
|
||||
String line;
|
||||
while ((line = br.readLine()) != null) {
|
||||
if (line.contains(magicStringKey)) {
|
||||
|
|
|
@ -31,9 +31,13 @@ import static com.rusefi.tools.tune.WriteSimulatorConfiguration.INI_FILE_FOR_SIM
|
|||
|
||||
/**
|
||||
* this command line utility compares two TS calibration files and produces .md files with C++ source code of the difference between those two files.
|
||||
*
|
||||
* <p>
|
||||
* Base 'default settings' file is msq generated by WriteSimulatorConfiguration.java with .xml extension but a real .msq could probably be used instead.
|
||||
* Second calibration file which contains desired base calibrations is a native TS calibration file.
|
||||
* <p>
|
||||
* [CannedTunes]
|
||||
* <p>
|
||||
* see <a href="https://github.com/rusefi/rusefi/wiki/Canned-Tune-Process">...</a>
|
||||
*/
|
||||
public class TuneCanTool {
|
||||
private static final Logging log = getLogging(TuneCanTool.class);
|
||||
|
@ -56,14 +60,14 @@ public class TuneCanTool {
|
|||
|
||||
RootHolder.ROOT = "../firmware/";
|
||||
|
||||
writeDiffBetweenLocalTuneFileAndDefaultTune("example.msq");
|
||||
// writeDiffBetweenLocalTuneFileAndDefaultTune("example.msq");
|
||||
|
||||
writeDiffBetweenLocalTuneFileAndDefaultTune("vehicleName", getDefaultTuneName(Fields.engine_type_e_MAVERICK_X3),
|
||||
"C:\\stuff\\i\\canam-2022-short\\canam-progress-pnp-dec-29.msq", "comment");
|
||||
// writeDiffBetweenLocalTuneFileAndDefaultTune("vehicleName", getDefaultTuneName(Fields.engine_type_e_MAVERICK_X3),
|
||||
// "C:\\stuff\\i\\canam-2022-short\\canam-progress-pnp-dec-29.msq", "comment");
|
||||
|
||||
|
||||
// processREOtune(1507, Fields.engine_type_e_HELLEN_154_HYUNDAI_COUPE_BK2, "BK2");
|
||||
// processREOtune(1502, Fields.engine_type_e_HYUNDAI_PB, "PB");
|
||||
processREOtune(1502, Fields.engine_type_e_HYUNDAI_PB, "PB");
|
||||
// processREOtune(1490, Fields.engine_type_e_MRE_M111, "m111-alex");
|
||||
// handle("Mitsubicha", 1258);
|
||||
// handle("Scion-1NZ-FE", 1448);
|
||||
|
|
|
@ -15,6 +15,9 @@ import java.util.Objects;
|
|||
|
||||
import static com.devexperts.logging.Logging.getLogging;
|
||||
|
||||
/**
|
||||
* see <a href="https://github.com/rusefi/rusefi/wiki/Canned-Tune-Process">...</a>
|
||||
*/
|
||||
public class WriteSimulatorConfiguration {
|
||||
private static final Logging log = getLogging(WriteSimulatorConfiguration.class);
|
||||
// f407-discovery is historically the most inclusive .ini file
|
||||
|
@ -27,7 +30,7 @@ public class WriteSimulatorConfiguration {
|
|||
try {
|
||||
readBinaryWriteXmlTune(Fields.SIMULATOR_TUNE_BIN_FILE_NAME, TuneCanTool.DEFAULT_TUNE);
|
||||
for (int type : new int[]{
|
||||
// see 'rusEfiFunctionalTest.cpp' which exports default tunes into binary files for us
|
||||
// [CannedTunes] see 'rusEfiFunctionalTest.cpp' which exports default tunes into binary files for us
|
||||
Fields.engine_type_e_MRE_M111,
|
||||
Fields.engine_type_e_HONDA_K,
|
||||
Fields.engine_type_e_HELLEN_154_HYUNDAI_COUPE_BK1,
|
||||
|
|
|
@ -53,6 +53,7 @@ ifeq ($(USE_OPT),)
|
|||
endif
|
||||
|
||||
# Pretend we are all different hardware so that all canned engine configs are included
|
||||
# [CannedTunes]
|
||||
USE_OPT += -DHW_HELLEN_HYUNDAI=1
|
||||
USE_OPT += -DHW_PROTEUS=1
|
||||
USE_OPT += -DHW_MICRO_RUSEFI=1
|
||||
|
|
|
@ -182,6 +182,7 @@ void rusEfiFunctionalTest(void) {
|
|||
|
||||
initFlash();
|
||||
|
||||
// [CannedTunes]
|
||||
for (auto const type : {
|
||||
engine_type_e::MRE_M111,
|
||||
engine_type_e::HONDA_K,
|
||||
|
|
Loading…
Reference in New Issue