Skip to content

Commit

Permalink
Merge pull request #147 from CANopenNode/n110_Exporting_to_XDD_v1.0_f…
Browse files Browse the repository at this point in the history
…ormat_sets_wrong_type_on_Highest_sub-index_supported

bugfix #110
  • Loading branch information
trojanobelix authored Nov 18, 2024
2 parents 05daa2e + 956d0fc commit b5820c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libEDSsharp/CanOpenXDD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,8 @@ public ISO15745ProfileContainer convert(EDSsharp eds)

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

if (od.objecttype == ObjectType.ARRAY && count != 0)
bytes = BitConverter.GetBytes((UInt16)od.datatype);
else
bytes = BitConverter.GetBytes((UInt16)subod.datatype);
bytes = (subod.datatype == DataType.UNKNOWN && od.parent != null) ? BitConverter.GetBytes((UInt16)od.parent.datatype) : BitConverter.GetBytes((UInt16)subod.datatype);

Array.Reverse(bytes);

// hack - special handling for rrw / rww access type
Expand Down

0 comments on commit b5820c6

Please sign in to comment.