EOL for generated files
This commit is contained in:
parent
64f00cd780
commit
fb19f30040
|
@ -1,4 +1,4 @@
|
||||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Mar 17 16:41:29 EDT 2017
|
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 27 21:28:58 EDT 2017
|
||||||
// begin
|
// begin
|
||||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||||
|
@ -2057,4 +2057,4 @@ typedef struct {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// end
|
// end
|
||||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Mar 17 16:41:29 EDT 2017
|
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 27 21:28:58 EDT 2017
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.rusefi.config;
|
package com.rusefi.config;
|
||||||
|
|
||||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Mar 26 18:06:23 EDT 2017
|
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 27 21:28:58 EDT 2017
|
||||||
public class Fields {
|
public class Fields {
|
||||||
public static final int LE_COMMAND_LENGTH = 200;
|
public static final int LE_COMMAND_LENGTH = 200;
|
||||||
public static final int FSIO_ADC_COUNT = 4;
|
public static final int FSIO_ADC_COUNT = 4;
|
||||||
|
|
Binary file not shown.
|
@ -12,6 +12,7 @@ import java.util.Stack;
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("StringConcatenationInsideStringBufferAppend")
|
@SuppressWarnings("StringConcatenationInsideStringBufferAppend")
|
||||||
public class ConfigDefinition {
|
public class ConfigDefinition {
|
||||||
|
public static final String EOL = "\n";
|
||||||
private static final String INPUT_FILE_NAME = "rusefi_config.txt";
|
private static final String INPUT_FILE_NAME = "rusefi_config.txt";
|
||||||
private static final String MESSAGE = "was generated automatically by ConfigDefinition.jar based on " + INPUT_FILE_NAME + " " + new Date();
|
private static final String MESSAGE = "was generated automatically by ConfigDefinition.jar based on " + INPUT_FILE_NAME + " " + new Date();
|
||||||
private static final String TS_FILE_INPUT_NAME = "rusefi.input";
|
private static final String TS_FILE_INPUT_NAME = "rusefi.input";
|
||||||
|
@ -62,9 +63,9 @@ public class ConfigDefinition {
|
||||||
processFile(br, cHeader, tsWriter, javaFieldsWriter);
|
processFile(br, cHeader, tsWriter, javaFieldsWriter);
|
||||||
|
|
||||||
BufferedWriter javaFields = new BufferedWriter(new FileWriter(javaConsolePath + File.separator + FIELDS_JAVA));
|
BufferedWriter javaFields = new BufferedWriter(new FileWriter(javaConsolePath + File.separator + FIELDS_JAVA));
|
||||||
javaFields.write("package com.rusefi.config;\r\n\r\n");
|
javaFields.write("package com.rusefi.config;" + EOL + EOL);
|
||||||
javaFields.write("// this file " + MESSAGE + "\r\n");
|
javaFields.write("// this file " + MESSAGE + EOL);
|
||||||
javaFields.write("public class Fields {\r\n");
|
javaFields.write("public class Fields {" + EOL);
|
||||||
javaFields.write(VariableRegistry.INSTANCE.getJavaConstants());
|
javaFields.write(VariableRegistry.INSTANCE.getJavaConstants());
|
||||||
javaFields.write(javaFieldsWriter.toString());
|
javaFields.write(javaFieldsWriter.toString());
|
||||||
javaFields.write("}\r\n");
|
javaFields.write("}\r\n");
|
||||||
|
@ -183,9 +184,9 @@ public class ConfigDefinition {
|
||||||
String message = "// this section " + MESSAGE + "\r\n";
|
String message = "// this section " + MESSAGE + "\r\n";
|
||||||
cHeader.write(message);
|
cHeader.write(message);
|
||||||
cHeader.write("// begin\r\n");
|
cHeader.write("// begin\r\n");
|
||||||
cHeader.write("#ifndef ENGINE_CONFIGURATION_GENERATED_H_\r\n");
|
cHeader.write("#ifndef ENGINE_CONFIGURATION_GENERATED_H_" + EOL);
|
||||||
cHeader.write("#define ENGINE_CONFIGURATION_GENERATED_H_\r\n");
|
cHeader.write("#define ENGINE_CONFIGURATION_GENERATED_H_" + EOL);
|
||||||
cHeader.write("#include \"rusefi_types.h\"\n");
|
cHeader.write("#include \"rusefi_types.h\"" + EOL);
|
||||||
|
|
||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
|
|
|
@ -60,9 +60,9 @@ public class ConfigStructure {
|
||||||
*/
|
*/
|
||||||
public void headerWrite(Writer cHeader) throws IOException {
|
public void headerWrite(Writer cHeader) throws IOException {
|
||||||
if (comment != null) {
|
if (comment != null) {
|
||||||
cHeader.write("/**\r\n" + ConfigDefinition.packComment(comment, "") + "\r\n*/\r\n");
|
cHeader.write("/**" + ConfigDefinition.EOL + ConfigDefinition.packComment(comment, "") + ConfigDefinition.EOL + "*/" + ConfigDefinition.EOL);
|
||||||
}
|
}
|
||||||
cHeader.write("typedef struct {\r\n");
|
cHeader.write("typedef struct {" + ConfigDefinition.EOL);
|
||||||
|
|
||||||
bitState.reset();
|
bitState.reset();
|
||||||
for (int i = 0; i < cFields.size(); i++) {
|
for (int i = 0; i < cFields.size(); i++) {
|
||||||
|
@ -74,8 +74,8 @@ public class ConfigStructure {
|
||||||
currentOffset += cf.getSize(next);
|
currentOffset += cf.getSize(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
cHeader.write("\t/** total size " + currentOffset + "*/\r\n");
|
cHeader.write("\t/** total size " + currentOffset + "*/" + ConfigDefinition.EOL);
|
||||||
cHeader.write("} " + name + ";\r\n\r\n");
|
cHeader.write("} " + name + ";" + ConfigDefinition.EOL + ConfigDefinition.EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int writeTunerStudio(String prefix, Writer tsHeader, int tsPosition) throws IOException {
|
public int writeTunerStudio(String prefix, Writer tsHeader, int tsPosition) throws IOException {
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class VariableRegistry extends TreeMap<String, String> {
|
||||||
if (intValues.containsKey(var))
|
if (intValues.containsKey(var))
|
||||||
throw new IllegalStateException("Not allowed to redefine: " + var);
|
throw new IllegalStateException("Not allowed to redefine: " + var);
|
||||||
intValues.put(var, intValue);
|
intValues.put(var, intValue);
|
||||||
javaNumbericDefinitions.append("\tpublic static final int " + var + " = " + intValue + ";\r\n");
|
javaNumbericDefinitions.append("\tpublic static final int " + var + " = " + intValue + ";" + ConfigDefinition.EOL);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
System.out.println("Not an integer: " + value);
|
System.out.println("Not an integer: " + value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue