Skip to content

Commit

Permalink
fixed load_dsdl problem
Browse files Browse the repository at this point in the history
Revert "fixed load_dsdl problem"

This reverts commit 3f63176.

fixed formatting
  • Loading branch information
Felix authored and tridge committed Aug 28, 2024
1 parent b76d480 commit 7a1ef2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dronecan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ def load_dsdl(*paths, **args):
for dtype in dtypes:
namespace, _, typename = dtype.full_name.rpartition(".")
root_namespace._path(namespace).__dict__[typename] = dtype
TYPENAMES[dtype.full_name] = dtype
if dtype.full_name not in TYPENAMES:
TYPENAMES[dtype.full_name] = dtype

if dtype.default_dtid:
DATATYPES[(dtype.default_dtid, dtype.kind)] = dtype
if (dtype.default_dtid, dtype.kind) not in DATATYPES:
DATATYPES[(dtype.default_dtid, dtype.kind)] = dtype
# Add the base CRC to each data type capable of being transmitted
dtype.base_crc = dsdl.crc16_from_bytes(struct.pack("<Q", dtype.get_data_type_signature()))
logger.debug("DSDL Load {: >30} DTID: {: >4} base_crc:{: >8}"
Expand Down

0 comments on commit 7a1ef2f

Please sign in to comment.