diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index c93acef16c..fb8e85106b 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/output/FragmentDialogConsumer.java b/java_tools/configuration_definition/src/main/java/com/rusefi/output/FragmentDialogConsumer.java index b4057d1987..bbbf51be6f 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/output/FragmentDialogConsumer.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/output/FragmentDialogConsumer.java @@ -9,7 +9,6 @@ import java.io.IOException; import static com.rusefi.output.JavaSensorsConsumer.quote; public class FragmentDialogConsumer implements ConfigurationConsumer { - private final StringBuilder graphLines = new StringBuilder(); private final StringBuilder graphList = new StringBuilder(); private final StringBuilder indicatorPanel = new StringBuilder(); @@ -39,6 +38,15 @@ public class FragmentDialogConsumer implements ConfigurationConsumer { int writeOneField(FieldIterator iterator, String prefix, int tsPosition) { ConfigField configField = iterator.cf; + if (configField.getName().startsWith(ConfigStructure.ALIGNMENT_FILL_AT)) + return 0; + + ConfigStructure cs = configField.getStructureType(); + if (cs != null) { + String extraPrefix = cs.withPrefix ? configField.getName() + "_" : ""; + return writeFields(cs.tsFields, prefix + extraPrefix, tsPosition); + } + if (configField.getName().startsWith(ConfigStructure.UNUSED_BIT_PREFIX)) return 0; @@ -60,7 +68,7 @@ public class FragmentDialogConsumer implements ConfigurationConsumer { startNewGraph(); } - graphLines.append("\tgraphLine = " + configField.getName() + "\n"); + graphList.append("\t\tgraphLine = " + prefix + configField.getName() + "\n"); linesInCurrentGraph++; @@ -73,11 +81,9 @@ public class FragmentDialogConsumer implements ConfigurationConsumer { private void startNewGraph() { currentGraphIndex++; - graphLines.append("liveGraph = " + getGraphControlName() + + graphList.append("\tliveGraph = " + getGraphControlName() + ", " + quote("Graph") + ", South\n"); - graphList.append("\tpanel = " + getGraphControlName() + "\n"); - } @NotNull @@ -103,7 +109,6 @@ public class FragmentDialogConsumer implements ConfigurationConsumer { return indicatorPanel + "\n" + - graphLines + "\n" + dialogDeclaration + indicatorPanelUsageLine + graphList + diff --git a/java_tools/configuration_definition/src/test/java/com/rusefi/test/FragmentDialogConsumerTest.java b/java_tools/configuration_definition/src/test/java/com/rusefi/test/FragmentDialogConsumerTest.java index a3c3adc0cb..337d075990 100644 --- a/java_tools/configuration_definition/src/test/java/com/rusefi/test/FragmentDialogConsumerTest.java +++ b/java_tools/configuration_definition/src/test/java/com/rusefi/test/FragmentDialogConsumerTest.java @@ -16,6 +16,14 @@ public class FragmentDialogConsumerTest { "\n" + "" + "struct_no_prefix output_channels_s\n" + + "struct speed_density_s\n" + + "\n" + + "float Tcharge_coff\n" + + "\n" + + "! speed_density_s\n" + + "end_struct\n" + + "\n" + + "speed_density_s sd;\n" + "bit sd_present\n" + "bit sd_present2\n" + "bit sd_present3\n" + @@ -36,23 +44,18 @@ public class FragmentDialogConsumerTest { "\tindicator = {sd_present2}, \"No\", \"Yes\"\n" + "\tindicator = {sd_present3}, \"No\", \"Yes\"\n" + "\n" + - "liveGraph = ac_state_1_Graph, \"Graph\", South\n" + - "\tgraphLine = RPMValue\n" + - "\tgraphLine = rpmAcceleration\n" + - "\tgraphLine = speedToRpmRatio\n" + - "\tgraphLine = alignmentFill_at_10\n" + - "liveGraph = ac_state_2_Graph, \"Graph\", South\n" + - "\tgraphLine = luaTimingMult\n" + - "\tgraphLine = vehicleSpeedKph\n" + - "\tgraphLine = internalMcuTemperature\n" + - "\tgraphLine = alignmentFill_at_18\n" + - "\n" + "dialog = ac_stateDialog, \"ac_state\"\n" + "\tpanel = ac_stateIndicatorPanel\n" + - "\tpanel = ac_state_1_Graph\n" + - "\tpanel = ac_state_2_Graph\n" + + "\tliveGraph = ac_state_1_Graph, \"Graph\", South\n" + + "\t\tgraphLine = sd_Tcharge_coff\n" + + "\t\tgraphLine = RPMValue\n" + + "\t\tgraphLine = rpmAcceleration\n" + + "\t\tgraphLine = speedToRpmRatio\n" + + "\tliveGraph = ac_state_2_Graph, \"Graph\", South\n" + + "\t\tgraphLine = luaTimingMult\n" + + "\t\tgraphLine = vehicleSpeedKph\n" + + "\t\tgraphLine = internalMcuTemperature\n" + "\n", fragmentDialogConsumer.getContent()); - } }