STRING support for java fields

This commit is contained in:
rusefi 2020-07-18 19:10:33 -04:00
parent 1b651a466b
commit cdd3e5a703
1 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,9 @@ public enum FieldType {
UINT16(2),
BIT(/*bits are stored in 4 byte packs */4),
FLOAT(4);
FLOAT(4),
STRING(0);
// todo: this is used for text protocol parsing - constant should be reused between firmware and console
public static final String INT_TYPE_STRING = "int";
@ -70,6 +72,8 @@ public enum FieldType {
}
public int getStorageSize() {
if (this == STRING)
throw new UnsupportedOperationException("storage size is unclear on " + this);
return storageSize;
}
}