Revert "A safe place where stuff is consistent (#4444)"
This reverts commit 15d42bd293
.
This commit is contained in:
parent
83f2e1e7a6
commit
9785c68e82
|
@ -10,13 +10,6 @@
|
|||
|
||||
pwd
|
||||
|
||||
# nasty: we have to invoke gen_live_documentation.sh with custom prepend due to CAM_INPUTS_COUNT difference
|
||||
java -DSystemOut.name=logs/gen_live_documentation \
|
||||
-DUsagesReader.prepend=config/boards/kinetis/config/rusefi_config_kinetis.txt \
|
||||
-cp ../java_tools/ConfigDefinition.jar \
|
||||
com.rusefi.ldmp.UsagesReader integration/LiveData.yaml
|
||||
[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; }
|
||||
|
||||
bash gen_signature.sh kin
|
||||
|
||||
source gen_config_common.sh
|
||||
|
|
|
@ -341,6 +341,5 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 0
|
|||
|
||||
int16_t autoscale rawBattery;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3
|
||||
|
||||
pid_status_s[CAM_INPUTS_COUNT iterate] vvtStatus
|
||||
uint8_t[160] unusedAtTheEnd;;"",1, 0, 0, 0, 0
|
||||
end_struct
|
||||
|
|
|
@ -62,9 +62,6 @@ done
|
|||
config/boards/kinetis/config/gen_kinetis_config.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }
|
||||
|
||||
# nasty: undo effects of custom kinetis generated files
|
||||
gen_live_documentation.sh
|
||||
|
||||
config/boards/hellen/cypress/config/gen_cypress_config.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR generating board hellen_cypress hellen_cypress"; exit 1; }
|
||||
|
||||
|
|
Binary file not shown.
|
@ -3,6 +3,10 @@ package com.rusefi.ldmp;
|
|||
import com.devexperts.logging.Logging;
|
||||
import com.rusefi.ConfigDefinition;
|
||||
import com.rusefi.ReaderState;
|
||||
import com.rusefi.RusefiParseErrorStrategy;
|
||||
import com.rusefi.newparse.ParseState;
|
||||
import com.rusefi.newparse.outputs.OutputChannelWriter;
|
||||
import com.rusefi.newparse.parsing.Definition;
|
||||
import com.rusefi.output.*;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
|
@ -33,8 +37,6 @@ public class UsagesReader {
|
|||
|
||||
private final StringBuilder fragmentsContent = new StringBuilder(header);
|
||||
|
||||
private static final String EXTRA_PREPEND = System.getProperty("UsagesReader.prepend");
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
if (args.length != 1) {
|
||||
System.err.println("One parameter expected: name of live data yaml input file");
|
||||
|
@ -76,7 +78,7 @@ public class UsagesReader {
|
|||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer();
|
||||
String tsOutputsDestination = "console/binary/";
|
||||
|
||||
ConfigurationConsumer outputsSections = new OutputsSectionConsumer(tsOutputsDestination + File.separator + "generated/output_channels.ini");
|
||||
OutputChannelWriter outputChannelWriter = new OutputChannelWriter(tsOutputsDestination + File.separator + "generated/output_channels.ini");
|
||||
|
||||
ConfigurationConsumer dataLogConsumer = new DataLogConsumer(tsOutputsDestination + File.separator + "generated/data_logs.ini");
|
||||
|
||||
|
@ -89,25 +91,41 @@ public class UsagesReader {
|
|||
log.info("Starting " + name + " at " + startingPosition);
|
||||
|
||||
ReaderState state = new ReaderState();
|
||||
state.setDefinitionInputFile(folder + File.separator + name + ".txt");
|
||||
String definitionInputFile = folder + File.separator + name + ".txt";
|
||||
state.setDefinitionInputFile(definitionInputFile);
|
||||
state.withC_Defines = withCDefines;
|
||||
|
||||
state.addDestination(javaSensorsConsumer,
|
||||
outputsSections,
|
||||
dataLogConsumer
|
||||
);
|
||||
FragmentDialogConsumer fragmentDialogConsumer = new FragmentDialogConsumer(name);
|
||||
state.addDestination(fragmentDialogConsumer);
|
||||
|
||||
if (EXTRA_PREPEND != null) {
|
||||
System.out.println("EXTRA_PREPEND=" + EXTRA_PREPEND);
|
||||
state.addPrepend(EXTRA_PREPEND);
|
||||
}
|
||||
state.addPrepend(prepend);
|
||||
state.addCHeaderDestination(folder + File.separator + name + "_generated.h");
|
||||
state.addJavaDestination("../java_console/models/src/main/java/com/rusefi/config/generated/" + javaName);
|
||||
state.doJob();
|
||||
|
||||
{
|
||||
ParseState parseState = new ParseState(state.enumsReader);
|
||||
|
||||
parseState.setDefinitionPolicy(Definition.OverwritePolicy.NotAllowed);
|
||||
|
||||
if (prepend != null && !prepend.isEmpty()) {
|
||||
RusefiParseErrorStrategy.parseDefinitionFile(parseState.getListener(), prepend);
|
||||
}
|
||||
|
||||
RusefiParseErrorStrategy.parseDefinitionFile(parseState.getListener(), definitionInputFile);
|
||||
|
||||
// if (outputNames.length == 0) {
|
||||
outputChannelWriter.writeOutputChannels(parseState, null);
|
||||
// } else {
|
||||
// for (int i = 0; i < outputNames.length; i++) {
|
||||
// outputChannelWriter.writeOutputChannels(parseState, outputNames[i]);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
fancyNewStuff.append(fragmentDialogConsumer.getContent());
|
||||
|
||||
fancyNewMenu.append(fragmentDialogConsumer.menuLine());
|
||||
|
|
Loading…
Reference in New Issue