Skip to content

Commit a2bff12

Browse files
authored
Merge pull request #390 from nada-ben-ali/NaBe/small_fix
Small fix
2 parents 90b8b96 + da66ea8 commit a2bff12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

odxtools/dataobjectproperty.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ def decode_from_pdu(self, decode_state: DecodeState) -> ParameterValue:
140140
internal_to_phys = self.compu_method.compu_internal_to_phys
141141
default_value = internal_to_phys.compu_default_value if internal_to_phys else None
142142

143-
if default_value is not None:
144-
return str(default_value)
143+
if default_value and default_value.value is not None:
144+
return default_value.value
145145

146146
odxraise(f"DOP {self.short_name} could not convert the coded value "
147147
f"{repr(internal)} to physical type {self.physical_type.base_data_type}.")

0 commit comments

Comments
 (0)