mirror of https://github.com/rusefi/rusefi.git
only:Improve toolset for default tune canned tune generation #4871
This commit is contained in:
parent
333812d0dd
commit
bb39ac1650
|
@ -29,7 +29,7 @@ public class IniFileModel {
|
|||
// this is only used while reading model - TODO extract reader
|
||||
private final List<DialogModel.Field> fieldsOfCurrentDialog = new ArrayList<>();
|
||||
public Map<String, IniField> allIniFields = new LinkedHashMap<>();
|
||||
public final List<DialogModel.Field> fieldsInUiOrder = new ArrayList<>();
|
||||
public final Map<String, DialogModel.Field> fieldsInUiOrder = new LinkedHashMap<>();
|
||||
|
||||
public Map<String, String> tooltips = new TreeMap<>();
|
||||
public Map<String, String> protocolMeta = new TreeMap<>();
|
||||
|
@ -102,7 +102,6 @@ public class IniFileModel {
|
|||
if (dialogUiName == null)
|
||||
dialogUiName = dialogId;
|
||||
dialogs.put(dialogUiName, new DialogModel(dialogId, dialogUiName, fieldsOfCurrentDialog));
|
||||
fieldsInUiOrder.addAll(fieldsOfCurrentDialog);
|
||||
|
||||
dialogId = null;
|
||||
fieldsOfCurrentDialog.clear();
|
||||
|
@ -259,8 +258,10 @@ public class IniFileModel {
|
|||
|
||||
DialogModel.Field field = new DialogModel.Field(key, uiFieldName);
|
||||
|
||||
if (key != null)
|
||||
if (key != null) {
|
||||
fieldsOfCurrentDialog.add(field);
|
||||
fieldsInUiOrder.put(key, field);
|
||||
}
|
||||
log.debug("IniFileModel: Field label=[" + uiFieldName + "] : key=[" + key + "]");
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ public class TuneCanTool {
|
|||
case "brain_input_pin_e":
|
||||
case "adc_channel_e":
|
||||
case "Gpio":
|
||||
case "spi_device_e":
|
||||
case "pin_input_mode_e":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -77,7 +79,7 @@ public class TuneCanTool {
|
|||
ConfigDefinition.doJob(totalArgs, state);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (DialogModel.Field f : ini.fieldsInUiOrder) {
|
||||
for (DialogModel.Field f : ini.fieldsInUiOrder.values()) {
|
||||
String name = f.getKey();
|
||||
Constant customValue = customTune.getConstantsAsMap().get(name);
|
||||
Constant defaultValue = defaultTune.getConstantsAsMap().get(name);
|
||||
|
|
Loading…
Reference in New Issue