diff --git a/autodoc/common.py b/autodoc/common.py index f65e3c1..0d6e4e1 100644 --- a/autodoc/common.py +++ b/autodoc/common.py @@ -37,9 +37,11 @@ def signal_byte_size(parent_id, sig_id, sig): noe = noe if noe > 0 else 1 nos = 1 if "Samples" not in sig else int(sig["Samples"]) if "Type" not in sig: - logging.fatal(f"no type defined for signal {parent_id}.{sig_id}") - sys.exit(1) - bytes = type_bytes_count(sig["Type"]) + logging.warning(f"no type defined for signal {parent_id}.{sig_id}") + if "Type" in sig: + bytes = type_bytes_count(sig["Type"]) + else: + bytes = type_bytes_count(signal_type(sig)[0]) tot = noe * nod * nos if "Ranges" in sig: @@ -51,7 +53,10 @@ def signal_byte_size(parent_id, sig_id, sig): def signal_type(sig): - type_name = sig["Type"] + if "Type" in sig: + type_name = sig["Type"] + else: + type_name = "uint32" noe = int(sig["NumberOfElements"]) if "NumberOfElements" in sig else 1 nod = int(sig["NumberOfDimensions"]) if "NumberOfDimensions" in sig else 1 nod = nod if nod > 0 else 1