mirror of https://github.com/rusefi/rusefi-1.git
parent
c6780b8369
commit
73d5898c5e
Binary file not shown.
|
@ -223,7 +223,6 @@ public class ConfigDefinition {
|
|||
* we have '-readfile OUTPUTS_SECTION' in one of .sh files in order to template rusefi.input
|
||||
* Same with '-readfile DATALOG_SECTION'
|
||||
*/
|
||||
state.destinations.add(new OutputsSectionConsumer(tsOutputsDestination + File.separator + "generated/output_channels.ini"));
|
||||
state.destinations.add(new DataLogConsumer(tsOutputsDestination + File.separator + "generated/data_logs.ini"));
|
||||
state.destinations.add(new GaugeConsumer(tsOutputsDestination + File.separator + "generated/gauges.ini"));
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.rusefi.ConfigDefinition;
|
|||
import com.rusefi.ReaderState;
|
||||
import com.rusefi.output.FragmentDialogConsumer;
|
||||
import com.rusefi.output.JavaSensorsConsumer;
|
||||
import com.rusefi.output.OutputsSectionConsumer;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -69,6 +70,9 @@ public class UsagesReader {
|
|||
|
||||
private int handleYaml(Map<String, Object> data, EntryHandler _handler) throws IOException {
|
||||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer();
|
||||
String tsOutputsDestination = "console/binary/";
|
||||
|
||||
OutputsSectionConsumer outputsSections = new OutputsSectionConsumer(tsOutputsDestination + File.separator + "generated/output_channels.ini");
|
||||
|
||||
EntryHandler handler = new EntryHandler() {
|
||||
|
||||
|
@ -101,7 +105,7 @@ public class UsagesReader {
|
|||
state.setDefinitionInputFile(folder + File.separator + name + ".txt");
|
||||
state.withC_Defines = withCDefines;
|
||||
|
||||
state.addDestination(javaSensorsConsumer);
|
||||
state.addDestination(javaSensorsConsumer, outputsSections);
|
||||
FragmentDialogConsumer fragmentDialogConsumer = new FragmentDialogConsumer(name);
|
||||
state.addDestination(fragmentDialogConsumer);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ public class OutputsSectionConsumer implements ConfigurationConsumer {
|
|||
|
||||
public OutputsSectionConsumer(String tsOutputsSectionFileName) {
|
||||
this.tsOutputsSectionFileName = tsOutputsSectionFileName;
|
||||
tsOutput = new TsOutput(false);
|
||||
tsOutput = new TsOutput(false, false);
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
|
|
|
@ -27,7 +27,7 @@ public class TSProjectConsumer implements ConfigurationConsumer {
|
|||
|
||||
public TSProjectConsumer(String tsPath, ReaderState state) {
|
||||
this.tsPath = tsPath;
|
||||
tsOutput = new TsOutput(true);
|
||||
tsOutput = new TsOutput(true, true);
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,10 +18,12 @@ import static com.rusefi.output.JavaSensorsConsumer.quote;
|
|||
public class TsOutput {
|
||||
private final StringBuilder settingContextHelp = new StringBuilder();
|
||||
private final boolean isConstantsSection;
|
||||
private final boolean registerOffsets;
|
||||
private final StringBuilder tsHeader = new StringBuilder();
|
||||
|
||||
public TsOutput(boolean longForm) {
|
||||
public TsOutput(boolean longForm, boolean registerOffsets) {
|
||||
this.isConstantsSection = longForm;
|
||||
this.registerOffsets = registerOffsets;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
|
@ -51,7 +53,9 @@ public class TsOutput {
|
|||
if (configField.getComment() != null && configField.getComment().trim().length() > 0 && cs == null) {
|
||||
settingContextHelp.append("\t" + nameWithPrefix + " = \"" + configField.getCommentContent() + "\"" + EOL);
|
||||
}
|
||||
state.variableRegistry.register(nameWithPrefix + "_offset", tsPosition);
|
||||
if (registerOffsets) {
|
||||
state.variableRegistry.register(nameWithPrefix + "_offset", tsPosition);
|
||||
}
|
||||
|
||||
if (cs != null) {
|
||||
String extraPrefix = cs.withPrefix ? configField.getName() + "_" : "";
|
||||
|
|
Loading…
Reference in New Issue