ETB duty cycle jitter #4833
This commit is contained in:
parent
5f7ba304bf
commit
07dd9dc662
Binary file not shown.
|
@ -22,11 +22,15 @@ public class LiveDataProcessor {
|
|||
|
||||
private final static String header = "// generated by gen_live_documentation.sh / LiveDataProcessor.java\n";
|
||||
|
||||
private final static String enumContentFileName = "console/binary/generated/live_data_ids.h";
|
||||
|
||||
private final StringBuilder enumContent = new StringBuilder(header +
|
||||
"#pragma once\n" +
|
||||
"\n" +
|
||||
"typedef enum {\n");
|
||||
|
||||
private final StringBuilder baseAddressCHeader = new StringBuilder();
|
||||
|
||||
private final StringBuilder totalSensors = new StringBuilder();
|
||||
|
||||
private final StringBuilder fancyNewStuff = new StringBuilder();
|
||||
|
@ -92,6 +96,8 @@ public class LiveDataProcessor {
|
|||
int startingPosition = javaSensorsConsumer.sensorTsPosition;
|
||||
log.info("Starting " + name + " at " + startingPosition);
|
||||
|
||||
baseAddressCHeader.append("#define " + name.toUpperCase() + "_BASE_ADDRESS " + startingPosition + "\n");
|
||||
|
||||
ReaderState state = new ReaderState();
|
||||
state.setDefinitionInputFile(folder + File.separator + name + ".txt");
|
||||
state.withC_Defines = withCDefines;
|
||||
|
@ -127,8 +133,6 @@ public class LiveDataProcessor {
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
ArrayList<LinkedHashMap> liveDocs = (ArrayList<LinkedHashMap>) data.get("Usages");
|
||||
|
||||
for (LinkedHashMap entry : liveDocs) {
|
||||
|
@ -196,9 +200,9 @@ public class LiveDataProcessor {
|
|||
}
|
||||
|
||||
private void writeFiles() throws IOException {
|
||||
String liveDataIdsHeader = "console/binary/generated/live_data_ids.h";
|
||||
try (FileWriter fw = new FileWriter(liveDataIdsHeader)) {
|
||||
try (FileWriter fw = new FileWriter(enumContentFileName)) {
|
||||
fw.write(enumContent.toString());
|
||||
fw.write(baseAddressCHeader.toString());
|
||||
}
|
||||
|
||||
try (FileWriter fw = new FileWriter("console/binary/generated/live_data_fragments.h")) {
|
||||
|
@ -206,7 +210,7 @@ public class LiveDataProcessor {
|
|||
}
|
||||
|
||||
String outputPath = "../java_console/io/src/main/java/com/rusefi/enums";
|
||||
InvokeReader request = new InvokeReader(outputPath, Collections.singletonList(liveDataIdsHeader));
|
||||
InvokeReader request = new InvokeReader(outputPath, Collections.singletonList(enumContentFileName));
|
||||
EnumToString.handleRequest(request);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue