Skip to content

Commit 60f064e

Browse files
SudlavAndreas Valdusson
andauthored
Corrected casing of BaudRate_xx keywords in DeviceInfo section of EDS files (#303)
Co-authored-by: Andreas Valdusson <[email protected]>
1 parent a142fb5 commit 60f064e

File tree

1 file changed

+2
-2
lines changed
  • canopen/objectdictionary

1 file changed

+2
-2
lines changed

canopen/objectdictionary/eds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def import_eds(source, node_id):
5252
else:
5353
for rate in [10, 20, 50, 125, 250, 500, 800, 1000]:
5454
baudPossible = int(
55-
eds.get("DeviceInfo", "Baudrate_%i" % rate, fallback='0'), 0)
55+
eds.get("DeviceInfo", "BaudRate_%i" % rate, fallback='0'), 0)
5656
if baudPossible != 0:
5757
od.device_information.allowed_baudrates.add(rate*1000)
5858

@@ -407,7 +407,7 @@ def export_record(var, eds):
407407
for rate in od.device_information.allowed_baudrates.union(
408408
{10e3, 20e3, 50e3, 125e3, 250e3, 500e3, 800e3, 1000e3}):
409409
eds.set(
410-
"DeviceInfo", "Baudrate_%i" % (rate/1000),
410+
"DeviceInfo", "BaudRate_%i" % (rate/1000),
411411
int(rate in od.device_information.allowed_baudrates))
412412

413413
if device_commisioning and (od.bitrate or od.node_id):

0 commit comments

Comments
 (0)