convention for fields without TS info
This commit is contained in:
parent
c4d5813bbf
commit
811b616aaa
Binary file not shown.
|
@ -13,6 +13,8 @@ import static com.rusefi.ConfigField.BOOLEAN_T;
|
|||
*/
|
||||
public class ConfigStructure {
|
||||
|
||||
private static final String ALIGNMENT_FILL_AT = "alignmentFill_at_";
|
||||
|
||||
public final String name;
|
||||
public final String comment;
|
||||
public final boolean withPrefix;
|
||||
|
@ -65,7 +67,7 @@ public class ConfigStructure {
|
|||
int fillSize = totalSize % 4 == 0 ? 0 : 4 - (totalSize % 4);
|
||||
|
||||
if (fillSize != 0) {
|
||||
ConfigField fill = new ConfigField(state, "alignmentFill_at_" + totalSize, "need 4 byte alignment",
|
||||
ConfigField fill = new ConfigField(state, ALIGNMENT_FILL_AT + totalSize, "need 4 byte alignment",
|
||||
"" + fillSize,
|
||||
TypesHelper.UINT8_T, fillSize, null, false, false, null, -1, null, null);
|
||||
addBoth(fill);
|
||||
|
|
|
@ -70,6 +70,9 @@ public class TSProjectConsumer implements ConfigurationConsumer {
|
|||
|
||||
tsPosition += size;
|
||||
} else if (configField.getTsInfo() == null) {
|
||||
if (!configField.getName().toLowerCase().contains("alignmentFill".toLowerCase()) && !configField.getName().toLowerCase().contains("unused")) {
|
||||
throw new IllegalArgumentException("Need TS info for " + configField.getName() + " at "+ prefix);
|
||||
}
|
||||
tsHeader.write(";no TS info - skipping " + prefix + configField.getName() + " offset " + tsPosition);
|
||||
tsPosition += configField.getArraySize() * configField.getElementSize();
|
||||
} else if (configField.getArraySize() != 1) {
|
||||
|
|
Loading…
Reference in New Issue