Skip to content

Commit

Permalink
Warn and relax global j1939 if non-extended IDs present
Browse files Browse the repository at this point in the history
  • Loading branch information
akVolvo committed Mar 15, 2024
1 parent c9d0e44 commit 532f97b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/asammdf/mdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4755,6 +4755,14 @@ def _extract_can_logging(
messages = {(message.arbitration_id.id, message.arbitration_id.extended): message for message in dbc}

global_is_j1939 = dbc.attributes.get("ProtocolType", "").lower() == "j1939"
not_extended = [msg for msg in dbc if not msg.arbitration_id.extended]
if global_is_j1939 and not_extended:
logger.warning(
f"Not all j1939 messages in <{dbc_name}> seem to use extended addressing. Disabling global j1939 flag..."
)
for msg in not_extended:
logger.warning(f" {msg} with id {msg.arbitration_id}")
global_is_j1939 = False # Relax req on j1939 adressing

j1939_messages = {
(
Expand Down

0 comments on commit 532f97b

Please sign in to comment.