diff --git a/autodoc/common.py b/autodoc/common.py index 6c833a0..ddb2382 100644 --- a/autodoc/common.py +++ b/autodoc/common.py @@ -35,7 +35,10 @@ def signal_byte_size(sig): nod = nod if nod > 0 else 1 noe = noe if noe > 0 else 1 nos = 1 if "Samples" not in sig else int(sig["Samples"]) - bytes = type_bytes_count(sig["Type"]) + 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: @@ -47,7 +50,10 @@ def signal_byte_size(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