XML export progress
This commit is contained in:
parent
35ab7eed3d
commit
6b707c010b
|
@ -2,3 +2,5 @@ openocd
|
|||
benchmark.txt
|
||||
gen_*.log
|
||||
deliver/
|
||||
rusefi_tool.log
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Launcher convert_binary_configuration_to_xml" type="Application" factoryName="Application">
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.Launcher" />
|
||||
<module name="ui" />
|
||||
<option name="PROGRAM_PARAMETERS" value="convert_binary_configuration_to_xml rusefi_configuration.image" />
|
||||
<option name="VM_PARAMETERS" value="-Dini_file_path=../firmware/tunerstudio -Dshow_etb_pane=true" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,5 +1,7 @@
|
|||
package com.opensr5.ini.field;
|
||||
|
||||
import com.opensr5.ConfigurationImage;
|
||||
import com.rusefi.config.Field;
|
||||
import com.rusefi.config.FieldType;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
@ -28,6 +30,21 @@ public class ArrayIniField extends IniField {
|
|||
return rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue(ConfigurationImage image) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int rowIndex = 0; rowIndex < rows; rowIndex++) {
|
||||
sb.append("\n\t");
|
||||
for (int colIndex = 0; colIndex < cols; colIndex++) {
|
||||
Field f = new Field("", getOffset() + rowIndex * getType().getStorageSize(), getType());
|
||||
sb.append(' ');
|
||||
sb.append(f.getAnyValue(image));
|
||||
}
|
||||
}
|
||||
sb.append("\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static IniField parse(LinkedList<String> list) {
|
||||
String name = list.get(0);
|
||||
FieldType type = FieldType.parseTs(list.get(2));
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ConsoleTools {
|
|||
TOOLS.put("functional_test", ConsoleTools::runFunctionalTest);
|
||||
TOOLS.put("compile_fsio_file", ConsoleTools::runCompileTool);
|
||||
TOOLS.put("firing_order", ConsoleTools::runFiringOrderTool);
|
||||
TOOLS.put("fun_convert", ConsoleTools::convertBinaryToXml);
|
||||
TOOLS.put("convert_binary_configuration_to_xml", ConsoleTools::convertBinaryToXml);
|
||||
TOOLS.put("reboot_ecu", args -> sendCommand(Fields.CMD_REBOOT));
|
||||
TOOLS.put(Fields.CMD_REBOOT_DFU, args -> sendCommand(Fields.CMD_REBOOT_DFU));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue