From 0015b9cb23ce58ec8dc5928a98d3266fa976c20d Mon Sep 17 00:00:00 2001 From: Jan Sommer Date: Tue, 14 Mar 2023 11:04:18 +0100 Subject: [PATCH] objectdictionary: Use node_id from DCF if ot provided --- canopen/objectdictionary/eds.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/canopen/objectdictionary/eds.py b/canopen/objectdictionary/eds.py index c1c54d78..5ecc4921 100644 --- a/canopen/objectdictionary/eds.py +++ b/canopen/objectdictionary/eds.py @@ -87,8 +87,9 @@ def import_eds(source, node_id): pass if eds.has_section("DeviceComissioning"): - od.bitrate = int(eds.get("DeviceComissioning", "BaudRate")) * 1000 + od.bitrate = int(eds.get("DeviceComissioning", "Baudrate")) * 1000 od.node_id = int(eds.get("DeviceComissioning", "NodeID"), 0) + node_id = node_id or od.node_id for section in eds.sections(): # Match dummy definitions