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 e6152a6 commit 5c4a68dCopy full SHA for 5c4a68d
src/canmatrix/formats/dbc.py
@@ -861,10 +861,10 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None
861
temp.group(1),
862
temp.group(3))
863
elif '"BusType"' in decoded:
864
- regexp = re.compile(r"^BA_ +\"BusType\" +\"(.+?)\" *; *")
865
- temp = regexp.match(decoded)
866
- if temp:
867
- db.add_attribute("BusType", f'"{temp.group(1)}"')
+ if '"CAN FD"' in decoded:
+ db.add_attribute("BusType", f'"CAN FD"')
+ elif '"CAN"' in decoded:
+ db.add_attribute("BusType", f'"CAN"')
868
else:
869
regexp = re.compile(
870
r"^BA_ +\"([A-Za-z0-9\-_]+)\" +([\"\S\-\.]+) *; *")
0 commit comments