We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 218deda commit 49ff649Copy full SHA for 49ff649
canmatrix/importsym.py
@@ -129,10 +129,16 @@ class Mode(object):
129
line = line.replace(' ', ' "" ')
130
tempArray = shlex.split(line.strip())
131
sigName = tempArray[0]
132
- if indexOffset == 1 and tempArray[1][:8] == "unsigned":
133
- is_signed = False
134
- else:
+
+ if indexOffset != 1:
135
is_signed = True
+ else:
136
+ if tempArray[1] == 'unsigned':
137
+ is_signed = False
138
+ elif tempArray[1] == 'signed':
139
+ is_signed = True
140
141
+ raise ValueError('Unknown type \'{}\' found'.format(tempArray[1]))
142
143
startBit = int(tempArray[indexOffset+1].split(',')[0])
144
signalLength = int(tempArray[indexOffset+1].split(',')[1])
0 commit comments