Skip to content

Commit

Permalink
When loading eds files the parent object will not have the datatype s…
Browse files Browse the repository at this point in the history
…et. Its really useful having this set for arrays internally so we known what the array is without walking subobjects
  • Loading branch information
robincornelius committed Jan 4, 2017
1 parent b9ddfa0 commit 0c11e50
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libEDSsharp/Bridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ public Device convert(EDSsharp eds)
}
}

if (od.objecttype == ObjectType.ARRAY && od.datatype == DataType.UNKNOWN)
{
//add the datatype field to parent objects if they don't have it already
//if the 2nd subobject does not exist then we do nothing.
ODentry sub = od.getsubobject(1);
if (sub != null)
{
od.datatype = sub.datatype;
}


}

dev.CANopenObjectList.CANopenObject.Add(coo);
}

Expand Down

0 comments on commit 0c11e50

Please sign in to comment.