Skip to content

Commit b5820c6

Browse files
authored
Merge pull request #147 from CANopenNode/n110_Exporting_to_XDD_v1.0_format_sets_wrong_type_on_Highest_sub-index_supported
bugfix #110
2 parents 05daa2e + 956d0fc commit b5820c6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libEDSsharp/CanOpenXDD.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,8 @@ public ISO15745ProfileContainer convert(EDSsharp eds)
517517

518518
AppLayer.CANopenObjectList.CANopenObject[count].CANopenSubObject[subcount].edseditor_extension_notifyonchange = subod.prop.CO_flagsPDO;
519519

520-
if (od.objecttype == ObjectType.ARRAY && count != 0)
521-
bytes = BitConverter.GetBytes((UInt16)od.datatype);
522-
else
523-
bytes = BitConverter.GetBytes((UInt16)subod.datatype);
520+
bytes = (subod.datatype == DataType.UNKNOWN && od.parent != null) ? BitConverter.GetBytes((UInt16)od.parent.datatype) : BitConverter.GetBytes((UInt16)subod.datatype);
521+
524522
Array.Reverse(bytes);
525523

526524
// hack - special handling for rrw / rww access type

0 commit comments

Comments
 (0)