diff --git a/.github/workflows/build-simulator.yaml b/.github/workflows/build-simulator.yaml index b17dd02fd6..96598d90d3 100644 --- a/.github/workflows/build-simulator.yaml +++ b/.github/workflows/build-simulator.yaml @@ -30,6 +30,10 @@ jobs: run: | bash gen_enum_to_string.sh + - name: Generate Live Documentation + working-directory: ./firmware/ + run: bash gen_live_documentation.sh + - name: Compile Simulator working-directory: ./simulator/ run: bash compile.sh diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 7f4203a4b4..223ebeacca 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -38,15 +38,13 @@ WaveChart waveChart; static scheduling_s debugToggleScheduling; #define DEBUG_PIN_DELAY US2NT(60) -trigger_central_s::trigger_central_s() : hwEventCounters() { -} - -TriggerCentral::TriggerCentral() : trigger_central_s(), +TriggerCentral::TriggerCentral() : vvtEventRiseCounter(), vvtEventFallCounter(), vvtPosition(), vvtSyncTimeNt() { + memset(&hwEventCounters, 0, sizeof(hwEventCounters)); triggerState.resetTriggerState(); noiseFilter.resetAccumSignalData(); } diff --git a/firmware/controllers/trigger/trigger_central.txt b/firmware/controllers/trigger/trigger_central.txt index a320df753f..585ea2eb26 100644 --- a/firmware/controllers/trigger/trigger_central.txt +++ b/firmware/controllers/trigger/trigger_central.txt @@ -1,6 +1,6 @@ #define HW_EVENT_TYPES 6 -struct_no_prefix define_constructor trigger_central_s +struct_no_prefix trigger_central_s int[HW_EVENT_TYPES iterate] hwEventCounters;Counter of hardware events since ECU start diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index 6079bcf7f1..1f8701c7e2 100644 Binary files a/java_tools/ConfigDefinition.jar and b/java_tools/ConfigDefinition.jar differ diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java b/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java index 2f61d94d81..4b0703cef1 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java @@ -27,7 +27,6 @@ public class ReaderState { private static final String END_STRUCT = "end_struct"; private static final String STRUCT_NO_PREFIX = "struct_no_prefix "; private static final String STRUCT = "struct "; - private static final String DEFINE_CONSTRUCTOR = "define_constructor"; public final Stack stack = new Stack<>(); public final Map tsCustomSize = new HashMap<>(); public final Map tsCustomLine = new HashMap<>(); @@ -221,15 +220,6 @@ public class ReaderState { } private static void handleStartStructure(ReaderState state, String line, boolean withPrefix) { - boolean withConstructor; - if (line.toLowerCase().startsWith(DEFINE_CONSTRUCTOR)) { - withConstructor = true; - line = line.substring(DEFINE_CONSTRUCTOR.length()).trim(); - } else { - withConstructor = false; - } - - String name; String comment; if (line.contains(" ")) { @@ -240,7 +230,7 @@ public class ReaderState { name = line; comment = null; } - ConfigStructure structure = new ConfigStructure(name, comment, withPrefix, withConstructor); + ConfigStructure structure = new ConfigStructure(name, comment, withPrefix); state.stack.push(structure); SystemOut.println("Starting structure " + structure.getName()); } diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/output/BaseCHeaderConsumer.java b/java_tools/configuration_definition/src/main/java/com/rusefi/output/BaseCHeaderConsumer.java index 3a985e43bc..11a954d3c8 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/output/BaseCHeaderConsumer.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/output/BaseCHeaderConsumer.java @@ -45,9 +45,6 @@ public abstract class BaseCHeaderConsumer implements ConfigurationConsumer { content.append("// start of " + structure.name + EOL); content.append("struct " + structure.name + " {" + EOL); - if (structure.isWithConstructor()) { - content.append("\t" + structure.name + "();" + EOL); - } int currentOffset = 0; diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/output/ConfigStructure.java b/java_tools/configuration_definition/src/main/java/com/rusefi/output/ConfigStructure.java index f83802a992..e62fad771c 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/output/ConfigStructure.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/output/ConfigStructure.java @@ -24,7 +24,6 @@ public class ConfigStructure { public final String name; public final String comment; public final boolean withPrefix; - private final boolean withConstructor; /** * We have two different collections because if 'array iterate' feature which is handled differently * in C and TS @@ -39,11 +38,10 @@ public class ConfigStructure { private ConfigField cPrevField = ConfigField.VOID; private final Set names = new HashSet<>(); - public ConfigStructure(String name, String comment, boolean withPrefix, boolean withConstructor) { + public ConfigStructure(String name, String comment, boolean withPrefix) { this.name = name; this.comment = comment; this.withPrefix = withPrefix; - this.withConstructor = withConstructor; } public void addBitField(ConfigField bitField) { @@ -51,10 +49,6 @@ public class ConfigStructure { this.readingBitState.incrementBitIndex(bitField); } - public boolean isWithConstructor() { - return withConstructor; - } - public String getName() { return name; }