only:Improve toolset for default tune canned tune generation #4871
This commit is contained in:
parent
9a27431161
commit
e4f20cf49a
|
@ -39,7 +39,7 @@ public class FiringOrderTSLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void readFiringOrders(String fileName, State state) throws IOException {
|
private static void readFiringOrders(String fileName, State state) throws IOException {
|
||||||
BufferedReader br = new BufferedReader(new FileReader(fileName));
|
BufferedReader br = new BufferedReader(new FileReader(RootHolder.ROOT + fileName));
|
||||||
|
|
||||||
String line;
|
String line;
|
||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class IoUtil2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static long getCrc32(String fileName) throws IOException {
|
private static long getCrc32(String fileName) throws IOException {
|
||||||
File file = new File(fileName);
|
File file = new File(RootHolder.ROOT + fileName);
|
||||||
byte[] fileContent = Files.readAllBytes(file.toPath());
|
byte[] fileContent = Files.readAllBytes(file.toPath());
|
||||||
for (int i = 0; i < fileContent.length; i++) {
|
for (int i = 0; i < fileContent.length; i++) {
|
||||||
byte aByte = fileContent[i];
|
byte aByte = fileContent[i];
|
||||||
|
|
|
@ -94,8 +94,6 @@ public class ReaderStateImpl implements ReaderState {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doJob() throws IOException {
|
public void doJob() throws IOException {
|
||||||
if (destinations.isEmpty())
|
|
||||||
throw new IllegalArgumentException("No destinations specified");
|
|
||||||
|
|
||||||
for (String prependFile : prependFiles)
|
for (String prependFile : prependFiles)
|
||||||
variableRegistry.readPrependValues(prependFile);
|
variableRegistry.readPrependValues(prependFile);
|
||||||
|
@ -105,7 +103,7 @@ public class ReaderStateImpl implements ReaderState {
|
||||||
* the destinations/writers
|
* the destinations/writers
|
||||||
*/
|
*/
|
||||||
SystemOut.println("Reading definition from " + definitionInputFile);
|
SystemOut.println("Reading definition from " + definitionInputFile);
|
||||||
BufferedReader definitionReader = new BufferedReader(new InputStreamReader(new FileInputStream(definitionInputFile), IoUtils.CHARSET.name()));
|
BufferedReader definitionReader = new BufferedReader(new InputStreamReader(new FileInputStream(RootHolder.ROOT + definitionInputFile), IoUtils.CHARSET.name()));
|
||||||
readBufferedReader(definitionReader, destinations);
|
readBufferedReader(definitionReader, destinations);
|
||||||
|
|
||||||
if (destCDefinesFileName != null) {
|
if (destCDefinesFileName != null) {
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.rusefi;
|
||||||
|
|
||||||
|
public class RootHolder {
|
||||||
|
public static String ROOT = "";
|
||||||
|
}
|
|
@ -61,7 +61,7 @@ public class VariableRegistry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readPrependValues(String prependFile) throws IOException {
|
public void readPrependValues(String prependFile) throws IOException {
|
||||||
readPrependValues(new FileReader(prependFile));
|
readPrependValues(new FileReader(RootHolder.ROOT + prependFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readPrependValues(Reader fileReader) throws IOException {
|
public void readPrependValues(Reader fileReader) throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue