mirror of https://github.com/rusefi/rusefi.git
only:Improve toolset for default tune canned tune generation #4871
This commit is contained in:
parent
60bb347cf1
commit
4fe7e4138b
|
@ -27,9 +27,8 @@ public class WriteSimulatorConfiguration {
|
|||
}
|
||||
|
||||
private static void writeTune() throws JAXBException, IOException {
|
||||
String s = "generated/simulator_tune_image.bin";
|
||||
byte[] fileContent = Files.readAllBytes(new File(s).toPath());
|
||||
System.out.println("Got " + fileContent.length + " from " + s + " while expecting " + Fields.TOTAL_CONFIG_SIZE);
|
||||
byte[] fileContent = Files.readAllBytes(new File(Fields.SIMULATOR_TUNE_BIN_FILE_NAME).toPath());
|
||||
System.out.println("Got " + fileContent.length + " from " + Fields.SIMULATOR_TUNE_BIN_FILE_NAME + " while expecting " + Fields.TOTAL_CONFIG_SIZE);
|
||||
if (fileContent.length != Fields.TOTAL_CONFIG_SIZE)
|
||||
throw new IllegalStateException("Unexpected image size " + fileContent.length);
|
||||
ConfigurationImage configuration = new ConfigurationImage(fileContent);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
@ -87,7 +87,7 @@ static void runCanGpioTest() {
|
|||
}
|
||||
|
||||
static void writeSimulatorTune() {
|
||||
FILE *ptr = fopen("generated/simulator_tune_image.bin", "wb");
|
||||
FILE *ptr = fopen(SIMULATOR_TUNE_BIN_FILE_NAME, "wb");
|
||||
fwrite(&persistentState.persistentConfiguration, 1, sizeof(persistentState.persistentConfiguration), ptr);
|
||||
fclose(ptr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue