generator progress
This commit is contained in:
parent
e117bff3de
commit
489b115611
|
@ -1,7 +1,7 @@
|
||||||
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon May 27 19:21:18 EDT 2019
|
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon May 27 20:05:22 EDT 2019
|
||||||
// begin
|
// begin
|
||||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
#ifndef CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
|
||||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
#define CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
|
||||||
#include "rusefi_types.h"
|
#include "rusefi_types.h"
|
||||||
// start of pid_s
|
// start of pid_s
|
||||||
struct pid_s {
|
struct pid_s {
|
||||||
|
@ -2788,4 +2788,4 @@ typedef struct persistent_config_s persistent_config_s;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// end
|
// end
|
||||||
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon May 27 19:21:18 EDT 2019
|
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon May 27 20:05:22 EDT 2019
|
||||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
||||||
<configuration default="false" name="ConfigDefinition" type="Application" factoryName="Application" nameIsGenerated="true">
|
<configuration default="false" name="ConfigDefinition" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.ConfigDefinition" />
|
<option name="MAIN_CLASS_NAME" value="com.rusefi.ConfigDefinition" />
|
||||||
<module name="configuration_definition" />
|
<module name="configuration_definition" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="-definition ../../firmware/integration/rusefi_config.txt -ts_destination ../../firmware/tunerstudio -c_destination ../../firmware/controllers\algo -java_destination ../../java_console -skip lastMd5" />
|
<option name="PROGRAM_PARAMETERS" value="-definition ../../firmware/integration/rusefi_config.txt -ts_destination ../../firmware/tunerstudio -c_destination ../../firmware/controllers\algo\engine_configuration_generated_structures.h -java_destination ../../java_console -skip lastMd5" />
|
||||||
<RunnerSettings RunnerId="Debug">
|
<RunnerSettings RunnerId="Debug">
|
||||||
<option name="DEBUG_PORT" value="" />
|
<option name="DEBUG_PORT" value="" />
|
||||||
<option name="TRANSPORT" value="0" />
|
<option name="TRANSPORT" value="0" />
|
||||||
|
|
|
@ -97,11 +97,8 @@ public class ConfigDefinition {
|
||||||
ReaderState state = new ReaderState();
|
ReaderState state = new ReaderState();
|
||||||
|
|
||||||
List<ConfigurationConsumer> destinations = new ArrayList<>();
|
List<ConfigurationConsumer> destinations = new ArrayList<>();
|
||||||
BufferedWriter cHeader = null;
|
|
||||||
if (destCHeader != null) {
|
if (destCHeader != null) {
|
||||||
System.out.println("Writing C header to " + destCHeader);
|
destinations.add(new CHeaderConsumer(destCHeader));
|
||||||
cHeader = new BufferedWriter(new FileWriter(destCHeader));
|
|
||||||
destinations.add(new CHeaderConsumer(cHeader));
|
|
||||||
}
|
}
|
||||||
if (tsPath != null) {
|
if (tsPath != null) {
|
||||||
CharArrayWriter tsWriter = new CharArrayWriter();
|
CharArrayWriter tsWriter = new CharArrayWriter();
|
||||||
|
@ -118,7 +115,6 @@ public class ConfigDefinition {
|
||||||
|
|
||||||
state.ensureEmptyAfterProcessing();
|
state.ensureEmptyAfterProcessing();
|
||||||
|
|
||||||
cHeader.close();
|
|
||||||
|
|
||||||
if (destCDefines != null)
|
if (destCDefines != null)
|
||||||
VariableRegistry.INSTANCE.writeNumericsToFile(destCDefines);
|
VariableRegistry.INSTANCE.writeNumericsToFile(destCDefines);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.rusefi.ConfigField;
|
||||||
import com.rusefi.ConfigStructure;
|
import com.rusefi.ConfigStructure;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static com.rusefi.ConfigDefinition.EOL;
|
import static com.rusefi.ConfigDefinition.EOL;
|
||||||
|
@ -16,12 +17,14 @@ public class CHeaderConsumer implements ConfigurationConsumer {
|
||||||
public static final String BOOLEAN_TYPE = "bool";
|
public static final String BOOLEAN_TYPE = "bool";
|
||||||
private final BufferedWriter cHeader;
|
private final BufferedWriter cHeader;
|
||||||
|
|
||||||
public CHeaderConsumer(BufferedWriter cHeader) throws IOException {
|
public CHeaderConsumer(String destCHeader) throws IOException {
|
||||||
this.cHeader = cHeader;
|
System.out.println("Writing C header to " + destCHeader);
|
||||||
|
cHeader = new BufferedWriter(new FileWriter(destCHeader));
|
||||||
cHeader.write("// this section " + ConfigDefinition.MESSAGE + EOL);
|
cHeader.write("// this section " + ConfigDefinition.MESSAGE + EOL);
|
||||||
cHeader.write("// begin" + EOL);
|
cHeader.write("// begin" + EOL);
|
||||||
cHeader.write("#ifndef ENGINE_CONFIGURATION_GENERATED_H_" + EOL);
|
String id = destCHeader.replaceAll("[\\\\\\.\\/]", "_").toUpperCase();
|
||||||
cHeader.write("#define ENGINE_CONFIGURATION_GENERATED_H_" + EOL);
|
cHeader.write("#ifndef " + id + EOL);
|
||||||
|
cHeader.write("#define " + id + EOL);
|
||||||
cHeader.write("#include \"rusefi_types.h\"" + EOL);
|
cHeader.write("#include \"rusefi_types.h\"" + EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,5 +80,6 @@ public class CHeaderConsumer implements ConfigurationConsumer {
|
||||||
cHeader.write("#endif" + EOL);
|
cHeader.write("#endif" + EOL);
|
||||||
cHeader.write("// end" + EOL);
|
cHeader.write("// end" + EOL);
|
||||||
cHeader.write("// this section " + ConfigDefinition.MESSAGE + EOL);
|
cHeader.write("// this section " + ConfigDefinition.MESSAGE + EOL);
|
||||||
|
cHeader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue