Skip to content

Commit bb6b528

Browse files
Merge pull request #219 from mlederhi/eds_default_value_patch
2 parents dd2d1a7 + 25394c3 commit bb6b528

File tree

1 file changed

+3
-1
lines changed
  • canopen/objectdictionary

1 file changed

+3
-1
lines changed

canopen/objectdictionary/eds.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def import_from_node(node_id, network):
138138

139139

140140
def _convert_variable(node_id, var_type, value):
141-
if var_type in objectdictionary.DATA_TYPES:
141+
if var_type in (objectdictionary.OCTET_STRING, objectdictionary.DOMAIN):
142+
return bytes.fromhex(value)
143+
elif var_type in (objectdictionary.VISIBLE_STRING, objectdictionary.UNICODE_STRING):
142144
return value
143145
elif var_type in objectdictionary.FLOAT_TYPES:
144146
return float(value)

0 commit comments

Comments
 (0)