bugfix: values of choices read from dbc files are integers
as they are for sym files
@@ -1006,7 +1006,7 @@ def _load_value_tables(tokens):
for value_table in tokens.get('VAL_TABLE_', []):
name = value_table[1]
- choices = {int(number): NamedSignalValue(number, text) for number, text in value_table[2]}
+ choices = {int(number): NamedSignalValue(int(number), text) for number, text in value_table[2]}
#choices = {int(number): text for number, text in value_table[2]}
value_tables[name] = choices
@@ -1039,7 +1039,7 @@ def _load_choices(tokens):
if len(choice[1]) == 0:
continue
- od = OrderedDict((int(v[0]), NamedSignalValue(v[0], v[1])) for v in choice[3])
+ od = OrderedDict((int(v[0]), NamedSignalValue(int(v[0]), v[1])) for v in choice[3])
if len(od) == 0:
continue
