EPIC: Improve toolset for default tune canned tune generation #4871

only: better method names
This commit is contained in:
rusefillc 2024-04-20 14:06:26 -04:00
parent f2167c862f
commit e906fd2e57
14 changed files with 53 additions and 53 deletions

View File

@ -18,7 +18,7 @@ public class ConfigFieldParserTest {
ReaderStateImpl state = new ReaderStateImpl(); ReaderStateImpl state = new ReaderStateImpl();
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "uint8_t[8] field"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "uint8_t[8] field");
assertEquals(cf.getType(), "uint8_t"); assertEquals(cf.getTypeName(), "uint8_t");
assertEquals(cf.getArraySizes().length, 1); assertEquals(cf.getArraySizes().length, 1);
assertEquals(cf.getArraySizes()[0], 8); assertEquals(cf.getArraySizes()[0], 8);
assertEquals(cf.getSize(null), 8); assertEquals(cf.getSize(null), 8);
@ -31,7 +31,7 @@ public class ConfigFieldParserTest {
ReaderStateImpl state = new ReaderStateImpl(); ReaderStateImpl state = new ReaderStateImpl();
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "uint8_t[8 x 16] field"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "uint8_t[8 x 16] field");
assertEquals(cf.getType(), "uint8_t"); assertEquals(cf.getTypeName(), "uint8_t");
assertEquals(cf.getArraySizes().length, 2); assertEquals(cf.getArraySizes().length, 2);
assertEquals(cf.getArraySizes()[0], 8); assertEquals(cf.getArraySizes()[0], 8);
assertEquals(cf.getArraySizes()[1], 16); assertEquals(cf.getArraySizes()[1], 16);
@ -383,7 +383,7 @@ public class ConfigFieldParserTest {
{ {
ReaderStateImpl state = new ReaderStateImpl(); ReaderStateImpl state = new ReaderStateImpl();
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int field"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int field");
assertEquals(cf.getType(), "int"); assertEquals(cf.getTypeName(), "int");
assertEquals(cf.getName(), "field", "Unexpected Field Name"); assertEquals(cf.getName(), "field", "Unexpected Field Name");
} }
@ -691,24 +691,24 @@ public class ConfigFieldParserTest {
assertNull(ConfigFieldImpl.parse(state, "int")); assertNull(ConfigFieldImpl.parse(state, "int"));
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int field"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int field");
assertEquals(cf.getType(), "int"); assertEquals(cf.getTypeName(), "int");
assertEquals(cf.getName(), "field", "Name"); assertEquals(cf.getName(), "field", "Name");
} }
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int_4 fie4_ld"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int_4 fie4_ld");
assertEquals(cf.getType(), "int_4"); assertEquals(cf.getTypeName(), "int_4");
assertEquals(cf.getName(), "fie4_ld"); assertEquals(cf.getName(), "fie4_ld");
} }
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int_8 fi_eld;comm_;ts,1,1"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int_8 fi_eld;comm_;ts,1,1");
assertEquals(cf.getType(), "int_8"); assertEquals(cf.getTypeName(), "int_8");
assertEquals(cf.getName(), "fi_eld"); assertEquals(cf.getName(), "fi_eld");
assertEquals(cf.getComment(), "comm_", "Comment"); assertEquals(cf.getComment(), "comm_", "Comment");
assertEquals(cf.getTsInfo(), "ts,1,1"); assertEquals(cf.getTsInfo(), "ts,1,1");
} }
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int[3 iterate] field"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int[3 iterate] field");
assertEquals(cf.getType(), "int"); assertEquals(cf.getTypeName(), "int");
assertEquals(cf.getArraySizes().length, 1); assertEquals(cf.getArraySizes().length, 1);
assertEquals(cf.getArraySizes()[0], 3); assertEquals(cf.getArraySizes()[0], 3);
assertTrue(cf.isIterate(), "isIterate"); assertTrue(cf.isIterate(), "isIterate");
@ -717,19 +717,19 @@ public class ConfigFieldParserTest {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int16_t crankingRpm;This,. value controls what RPM values we consider 'cranking' (any RPM below 'crankingRpm')\\nAnything above 'crankingRpm' would be 'running'"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int16_t crankingRpm;This,. value controls what RPM values we consider 'cranking' (any RPM below 'crankingRpm')\\nAnything above 'crankingRpm' would be 'running'");
assertEquals(cf.getName(), "crankingRpm"); assertEquals(cf.getName(), "crankingRpm");
assertEquals(cf.getArraySizes().length, 0); assertEquals(cf.getArraySizes().length, 0);
assertEquals(cf.getType(), "int16_t"); assertEquals(cf.getTypeName(), "int16_t");
} }
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "MAP_sensor_config_s map"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "MAP_sensor_config_s map");
assertEquals(cf.getName(), "map"); assertEquals(cf.getName(), "map");
assertEquals(cf.getArraySizes().length, 0); assertEquals(cf.getArraySizes().length, 0);
assertEquals(cf.getType(), "MAP_sensor_config_s"); assertEquals(cf.getTypeName(), "MAP_sensor_config_s");
} }
{ {
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "MAP_sensor_config_s map;@see hasMapSensor\\n@see isMapAveragingEnabled"); ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "MAP_sensor_config_s map;@see hasMapSensor\\n@see isMapAveragingEnabled");
assertEquals(cf.getName(), "map"); assertEquals(cf.getName(), "map");
assertEquals(cf.getArraySizes().length, 0); assertEquals(cf.getArraySizes().length, 0);
assertEquals(cf.getType(), "MAP_sensor_config_s"); assertEquals(cf.getTypeName(), "MAP_sensor_config_s");
assertEquals(cf.getComment(), "@see hasMapSensor\\n@see isMapAveragingEnabled"); assertEquals(cf.getComment(), "@see hasMapSensor\\n@see isMapAveragingEnabled");
} }
} }

View File

@ -11,7 +11,7 @@ public interface ConfigField {
} }
@Override @Override
public ConfigStructure getParent() { public ConfigStructure getParentStructureType() {
return null; return null;
} }
@ -66,7 +66,7 @@ public interface ConfigField {
} }
@Override @Override
public String getType() { public String getTypeName() {
return null; return null;
} }
@ -163,7 +163,9 @@ public interface ConfigField {
} }
} }
ConfigStructure getParent(); ConfigStructure getParentStructureType();
String getTypeName();
ConfigStructure getStructureType(); ConfigStructure getStructureType();
@ -187,7 +189,6 @@ public interface ConfigField {
String getName(); String getName();
String getType();
int getElementSize(); int getElementSize();

View File

@ -107,7 +107,7 @@ public class ConfigFieldImpl implements ConfigField {
} }
@Override @Override
public ConfigStructure getParent() { public ConfigStructure getParentStructureType() {
return parent; return parent;
} }
@ -120,7 +120,7 @@ public class ConfigFieldImpl implements ConfigField {
@Override @Override
public ConfigStructure getStructureType() { public ConfigStructure getStructureType() {
return getState().getStructures().get(getType()); return getState().getStructures().get(getTypeName());
} }
@Override @Override
@ -282,7 +282,7 @@ public class ConfigFieldImpl implements ConfigField {
* @see TypesHelper * @see TypesHelper
*/ */
@Override @Override
public String getType() { public String getTypeName() {
return type; return type;
} }

View File

@ -337,13 +337,13 @@ public class ReaderStateImpl implements ReaderState {
throw new IllegalStateException(cf.getName() + ": Not enclosed in a struct"); throw new IllegalStateException(cf.getName() + ": Not enclosed in a struct");
ConfigStructureImpl structure = state.stack.peek(); ConfigStructureImpl structure = state.stack.peek();
Integer getPrimitiveSize = TypesHelper.getPrimitiveSize(cf.getType()); Integer getPrimitiveSize = TypesHelper.getPrimitiveSize(cf.getTypeName());
Integer customTypeSize = state.tsCustomSize.get(cf.getType()); Integer customTypeSize = state.tsCustomSize.get(cf.getTypeName());
if (getPrimitiveSize != null && getPrimitiveSize > 1) { if (getPrimitiveSize != null && getPrimitiveSize > 1) {
if (log.debugEnabled()) if (log.debugEnabled())
log.debug("Need to align before " + cf.getName()); log.debug("Need to align before " + cf.getName());
structure.addAlignmentFill(state, getPrimitiveSize); structure.addAlignmentFill(state, getPrimitiveSize);
} else if (state.structures.containsKey(cf.getType())) { } else if (state.structures.containsKey(cf.getTypeName())) {
// we are here for struct members // we are here for struct members
structure.addAlignmentFill(state, 4); structure.addAlignmentFill(state, 4);
} else if (customTypeSize != null) { } else if (customTypeSize != null) {
@ -355,7 +355,7 @@ public class ReaderStateImpl implements ReaderState {
for (int i = 1; i <= cf.getArraySizes()[0]; i++) { for (int i = 1; i <= cf.getArraySizes()[0]; i++) {
String commentWithIndex = getCommentWithIndex(cf, i); String commentWithIndex = getCommentWithIndex(cf, i);
ConfigFieldImpl element = new ConfigFieldImpl(state, cf.getName() + i, commentWithIndex, null, ConfigFieldImpl element = new ConfigFieldImpl(state, cf.getName() + i, commentWithIndex, null,
cf.getType(), new int[0], cf.getTsInfo(), false, cf.isHasAutoscale(), null, null); cf.getTypeName(), new int[0], cf.getTsInfo(), false, cf.isHasAutoscale(), null, null);
element.setFromIterate(cf.getName(), i); element.setFromIterate(cf.getName(), i);
structure.addTs(element); structure.addTs(element);
} }

View File

@ -27,7 +27,7 @@ public class BaseCHeaderConsumer implements ConfigurationConsumer {
String cEntry = getComment(configField.getComment(), iterator.currentOffset, configField.getUnits()); String cEntry = getComment(configField.getComment(), iterator.currentOffset, configField.getUnits());
String typeName = configField.getType(); String typeName = configField.getTypeName();
String autoscaleSpec = configField.autoscaleSpec(); String autoscaleSpec = configField.autoscaleSpec();
if (autoscaleSpec != null) { if (autoscaleSpec != null) {
@ -37,9 +37,9 @@ public class BaseCHeaderConsumer implements ConfigurationConsumer {
if (!configField.isArray()) { if (!configField.isArray()) {
// not an array // not an array
cEntry += "\t" + typeName + " " + configField.getName(); cEntry += "\t" + typeName + " " + configField.getName();
if (needZeroInit && TypesHelper.isPrimitive(configField.getType())) { if (needZeroInit && TypesHelper.isPrimitive(configField.getTypeName())) {
// we need this cast in case of enums // we need this cast in case of enums
cEntry += " = (" + configField.getType() + ")0"; cEntry += " = (" + configField.getTypeName() + ")0";
} }
cEntry += ";" + EOL; cEntry += ";" + EOL;
} else { } else {

View File

@ -94,7 +94,7 @@ public class DataLogConsumer implements ConfigurationConsumer {
String typeString; String typeString;
String autoscaleSpec = configField.autoscaleSpec(); String autoscaleSpec = configField.autoscaleSpec();
if (TypesHelper.isFloat(configField.getType()) || (autoscaleSpec != null && !autoscaleSpec.equals("1, 1"))) { if (TypesHelper.isFloat(configField.getTypeName()) || (autoscaleSpec != null && !autoscaleSpec.equals("1, 1"))) {
typeString = "float, \"%.3f\""; typeString = "float, \"%.3f\"";
} else { } else {
typeString = "int, \"%d\""; typeString = "int, \"%d\"";

View File

@ -8,7 +8,6 @@ import com.rusefi.util.LazyFile;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -97,7 +96,7 @@ public class GetConfigValueConsumer implements ConfigurationConsumer {
if (cf.isArray() || cf.isFromIterate() || cf.isDirective()) if (cf.isArray() || cf.isFromIterate() || cf.isDirective())
return ""; return "";
if (!TypesHelper.isPrimitive(cf.getType()) && !TypesHelper.isBoolean(cf.getType())) { if (!TypesHelper.isPrimitive(cf.getTypeName()) && !TypesHelper.isBoolean(cf.getTypeName())) {
return ""; return "";
} }
@ -109,7 +108,7 @@ public class GetConfigValueConsumer implements ConfigurationConsumer {
if (javaName.startsWith(CONFIG_ENGINE_CONFIGURATION)) if (javaName.startsWith(CONFIG_ENGINE_CONFIGURATION))
javaName = "engineConfiguration->" + javaName.substring(CONFIG_ENGINE_CONFIGURATION.length()); javaName = "engineConfiguration->" + javaName.substring(CONFIG_ENGINE_CONFIGURATION.length());
variables.add(new VariableRecord(userName, javaName + cf.getName(), cf.getType(), null)); variables.add(new VariableRecord(userName, javaName + cf.getName(), cf.getTypeName(), null));
mdContent.append("### " + userName + "\n"); mdContent.append("### " + userName + "\n");
mdContent.append(cf.getComment() + "\n\n"); mdContent.append(cf.getComment() + "\n\n");

View File

@ -54,7 +54,7 @@ public class GetOutputValueConsumer implements ConfigurationConsumer {
if (cf.isArray() || cf.isFromIterate() || cf.isDirective()) if (cf.isArray() || cf.isFromIterate() || cf.isDirective())
return ""; return "";
if (!TypesHelper.isPrimitive(cf.getType()) && !TypesHelper.isBoolean(cf.getType())) { if (!TypesHelper.isPrimitive(cf.getTypeName()) && !TypesHelper.isBoolean(cf.getTypeName())) {
return ""; return "";
} }

View File

@ -47,7 +47,7 @@ public abstract class JavaFieldsConsumer implements ConfigurationConsumer {
} }
private boolean isStringField(ConfigField configField) { private boolean isStringField(ConfigField configField) {
String custom = state.getTsCustomLine().get(configField.getType()); String custom = state.getTsCustomLine().get(configField.getTypeName());
return custom != null && custom.toLowerCase().startsWith(IniFileModel.FIELD_TYPE_STRING); return custom != null && custom.toLowerCase().startsWith(IniFileModel.FIELD_TYPE_STRING);
} }
@ -83,23 +83,23 @@ public abstract class JavaFieldsConsumer implements ConfigurationConsumer {
return tsPosition; return tsPosition;
} }
if (TypesHelper.isFloat(configField.getType())) { if (TypesHelper.isFloat(configField.getTypeName())) {
writeJavaFieldName(nameWithPrefix, tsPosition); writeJavaFieldName(nameWithPrefix, tsPosition);
content.append("FieldType.FLOAT)" + terminateField()); content.append("FieldType.FLOAT)" + terminateField());
} else { } else {
String enumOptions = state.getVariableRegistry().get(configField.getType() + VariableRegistry.ARRAY_FORMAT_ENUM); String enumOptions = state.getVariableRegistry().get(configField.getTypeName() + VariableRegistry.ARRAY_FORMAT_ENUM);
if (enumOptions == null) if (enumOptions == null)
enumOptions = state.getVariableRegistry().get(configField.getType() + VariableRegistry.KEY_VALUE_FORMAT_ENUM); enumOptions = state.getVariableRegistry().get(configField.getTypeName() + VariableRegistry.KEY_VALUE_FORMAT_ENUM);
if (enumOptions != null && !existingJavaEnums.contains(configField.getType())) { if (enumOptions != null && !existingJavaEnums.contains(configField.getTypeName())) {
existingJavaEnums.add(configField.getType()); existingJavaEnums.add(configField.getTypeName());
content.append("\tpublic static final String[] " + configField.getType() + " = {" + enumOptions + "};" + EOL); content.append("\tpublic static final String[] " + configField.getTypeName() + " = {" + enumOptions + "};" + EOL);
} }
writeJavaFieldName(nameWithPrefix, tsPosition); writeJavaFieldName(nameWithPrefix, tsPosition);
if (isStringField(configField)) { if (isStringField(configField)) {
String custom = state.getTsCustomLine().get(configField.getType()); String custom = state.getTsCustomLine().get(configField.getTypeName());
String[] tokens = custom.split(","); String[] tokens = custom.split(",");
String stringSize = tokens[3].trim(); String stringSize = tokens[3].trim();
content.append(stringSize + ", FieldType.STRING"); content.append(stringSize + ", FieldType.STRING");
@ -107,7 +107,7 @@ public abstract class JavaFieldsConsumer implements ConfigurationConsumer {
content.append(getJavaType(configField.getElementSize())); content.append(getJavaType(configField.getElementSize()));
} }
if (enumOptions != null) { if (enumOptions != null) {
content.append(", " + configField.getType()); content.append(", " + configField.getTypeName());
} }
content.append(")" + ".setScale(" + configField.autoscaleSpecNumber() + ")" + content.append(")" + ".setScale(" + configField.autoscaleSpecNumber() + ")" +
terminateField()); terminateField());

View File

@ -30,7 +30,7 @@ class PerFieldWithStructuresIterator extends FieldIterator {
@Override @Override
public void end() { public void end() {
ConfigStructure cs = cf.getState().getStructures().get(cf.getType()); ConfigStructure cs = cf.getState().getStructures().get(cf.getTypeName());
String content; String content;
if (cs != null) { if (cs != null) {
if (strategy.skip(cf)) { if (strategy.skip(cf)) {

View File

@ -71,7 +71,7 @@ public class SdCardFieldsContent {
categoryStr = ", " + categoryStr; categoryStr = ", " + categoryStr;
} }
boolean isEnum = configField.getType().contains("_e"); boolean isEnum = configField.getTypeName().contains("_e");
if (isEnum) if (isEnum)
return ""; return "";

View File

@ -97,9 +97,9 @@ public class TsOutput {
return tsPosition; return tsPosition;
} }
if (configField.getState().getTsCustomLine().containsKey(configField.getType())) { if (configField.getState().getTsCustomLine().containsKey(configField.getTypeName())) {
// todo: rename 'bits' to 'customLine' or something since _not_ bits for array? // todo: rename 'bits' to 'customLine' or something since _not_ bits for array?
String bits = configField.getState().getTsCustomLine().get(configField.getType()); String bits = configField.getState().getTsCustomLine().get(configField.getTypeName());
if (!bits.startsWith("bits")) { if (!bits.startsWith("bits")) {
// 'array' would be handled here // 'array' would be handled here
bits = handleTsInfo(configField, bits, 5); bits = handleTsInfo(configField, bits, 5);
@ -109,10 +109,10 @@ public class TsOutput {
tsHeader.append(nameWithPrefix + " = " + bits); tsHeader.append(nameWithPrefix + " = " + bits);
if (!configField.getName().equals(next.getName())) if (!configField.getName().equals(next.getName()))
tsPosition += configField.getState().getTsCustomSize().get(configField.getType()); tsPosition += configField.getState().getTsCustomSize().get(configField.getTypeName());
} else if (configField.getArraySizes().length == 0) { } else if (configField.getArraySizes().length == 0) {
tsHeader.append(temporaryLineComment + nameWithPrefix + " = scalar, "); tsHeader.append(temporaryLineComment + nameWithPrefix + " = scalar, ");
tsHeader.append(TypesHelper.convertToTs(configField.getType()) + ","); tsHeader.append(TypesHelper.convertToTs(configField.getTypeName()) + ",");
tsHeader.append(" " + tsPosition + ","); tsHeader.append(" " + tsPosition + ",");
tsHeader.append(" " + handleTsInfo(configField, configField.getTsInfo(), 1)); tsHeader.append(" " + handleTsInfo(configField, configField.getTsInfo(), 1));
if (!configField.getName().equals(next.getName())) if (!configField.getName().equals(next.getName()))
@ -122,7 +122,7 @@ public class TsOutput {
// TS does not like those // TS does not like those
} else { } else {
tsHeader.append(nameWithPrefix + " = array, "); tsHeader.append(nameWithPrefix + " = array, ");
tsHeader.append(TypesHelper.convertToTs(configField.getType()) + ","); tsHeader.append(TypesHelper.convertToTs(configField.getTypeName()) + ",");
tsHeader.append(" " + tsPosition + ","); tsHeader.append(" " + tsPosition + ",");
tsHeader.append(" ["); tsHeader.append(" [");
boolean first = true; boolean first = true;
@ -157,7 +157,7 @@ public class TsOutput {
if (tsInfo == null || tsInfo.trim().isEmpty()) { if (tsInfo == null || tsInfo.trim().isEmpty()) {
// default units and scale // default units and scale
if (isConstantsSection) { if (isConstantsSection) {
if (configField.getType().equalsIgnoreCase(Type.U16.cType) || configField.getType().equalsIgnoreCase(Type.S16.cType)) if (configField.getTypeName().equalsIgnoreCase(Type.U16.cType) || configField.getTypeName().equalsIgnoreCase(Type.S16.cType))
return quote("") + ", 1, 0, 0, 32000, 0"; return quote("") + ", 1, 0, 0, 32000, 0";
return quote("") + ", 1, 0, 0, 100, 0"; return quote("") + ", 1, 0, 0, 100, 0";
} }

View File

@ -49,7 +49,7 @@ public class MetaHelper {
fromIndex++; // skip underscore fromIndex++; // skip underscore
if (cf == null) if (cf == null)
continue; continue;
String type = cf.getType(); String type = cf.getTypeName();
s = state.getStructures().get(type); s = state.getStructures().get(type);
if (s != null) { if (s != null) {

View File

@ -213,7 +213,7 @@ public class TuneCanTool implements TuneCanToolConstants {
log.info("Not found " + fieldName); log.info("Not found " + fieldName);
continue; continue;
} }
if (TypesHelper.isFloat(cf.getType()) && !cf.isArray()) { if (TypesHelper.isFloat(cf.getTypeName()) && !cf.isArray()) {
float floatDefaultValue = Float.parseFloat(defaultValue.getValue()); float floatDefaultValue = Float.parseFloat(defaultValue.getValue());
float floatCustomValue = Float.parseFloat(customValue.getValue()); float floatCustomValue = Float.parseFloat(customValue.getValue());
if (floatCustomValue != 0 && Math.abs(floatDefaultValue / floatCustomValue - 1) < 0.001) { if (floatCustomValue != 0 && Math.abs(floatDefaultValue / floatCustomValue - 1) < 0.001) {
@ -227,21 +227,21 @@ public class TuneCanTool implements TuneCanToolConstants {
continue; continue;
} }
if (cf.getType().equals("boolean")) { if (cf.getTypeName().equals("boolean")) {
sb.append(TuneTools.getAssignmentCode(defaultValue, cName, unquote(customValue.getValue()))); sb.append(TuneTools.getAssignmentCode(defaultValue, cName, unquote(customValue.getValue())));
continue; continue;
} }
if (cf.isArray()) { if (cf.isArray()) {
String parentReference; String parentReference;
if (cf.getParent().getName().equals("engine_configuration_s")) { if (cf.getParentStructureType().getName().equals("engine_configuration_s")) {
parentReference = "engineConfiguration->"; parentReference = "engineConfiguration->";
} else if (cf.getParent().getName().equals("persistent_config_s")) { } else if (cf.getParentStructureType().getName().equals("persistent_config_s")) {
parentReference = "config->"; parentReference = "config->";
} else { } else {
// todo: for instance map.samplingAngle // todo: for instance map.samplingAngle
//throw new IllegalStateException("Unexpected " + cf.getParent()); //throw new IllegalStateException("Unexpected " + cf.getParent());
log.info(" " + cf); log.info("Unable to locate parent: " + cf + " / parent=" + cf.getParentStructureType());
continue; continue;
} }
@ -295,7 +295,7 @@ public class TuneCanTool implements TuneCanToolConstants {
if (!Node.isNumeric(customValue.getValue())) { if (!Node.isNumeric(customValue.getValue())) {
// todo: smarter logic for enums // todo: smarter logic for enums
String type = cf.getType(); String type = cf.getTypeName();
if (isHardwareEnum(type)) { if (isHardwareEnum(type)) {
continue; continue;
} }