Skip to content

Commit

Permalink
Complete hooking up of High/Low limits and actual value
Browse files Browse the repository at this point in the history
  • Loading branch information
robincornelius committed Feb 1, 2019
1 parent f9d0871 commit 9931703
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
10 changes: 5 additions & 5 deletions EDSTest/DeviceODView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ private void button_save_changes_Click(object sender, EventArgs e)
selectedobject.Description = textBox_description.Text;
selectedobject.defaultvalue = textBox_defaultvalue.Text;
selectedobject.denotation = textBox_denotation.Text;
selectedobject.HighLimit = textBox_highvalue.Text;
selectedobject.LowLimit = textBox_lowvalue.Text;
selectedobject.actualvalue = textBox_actualvalue.Text;

if (!(selectedobject.parent != null && selectedobject.parent.objecttype == ObjectType.ARRAY))
{

selectedobject.defaultvalue = textBox_defaultvalue.Text;
selectedobject.TPDODetectCos = checkBox_COS.Checked;
selectedobject.HighLimit = textBox_highvalue.Text;
selectedobject.LowLimit = textBox_lowvalue.Text;
selectedobject.actualvalue = textBox_actualvalue.Text;




DataType dt = (DataType)Enum.Parse(typeof(DataType), comboBox_datatype.SelectedItem.ToString());
selectedobject.datatype = dt;

Expand Down
13 changes: 13 additions & 0 deletions libEDSsharp/CanOpenXDD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ public ISO15745ProfileContainer convert(EDSsharp eds)
AppLayer.CANopenObjectList.CANopenObject[count].denotation = od.denotation;
AppLayer.CANopenObjectList.CANopenObject[count].edseditor_extenstion_storagelocation = od.StorageLocation;

AppLayer.CANopenObjectList.CANopenObject[count].highLimit = od.HighLimit;
AppLayer.CANopenObjectList.CANopenObject[count].lowLimit = od.LowLimit;
AppLayer.CANopenObjectList.CANopenObject[count].actualValue = od.actualvalue;

if (od.subobjects != null && od.subobjects.Count > 0)
{
AppLayer.CANopenObjectList.CANopenObject[count].subNumber = (byte)od.subobjects.Count;
Expand Down Expand Up @@ -485,6 +489,11 @@ public ISO15745ProfileContainer convert(EDSsharp eds)
AppLayer.CANopenObjectList.CANopenObject[count].CANopenSubObject[subcount].accessType = (CANopenObjectListCANopenObjectCANopenSubObjectAccessType)Enum.Parse(typeof(CANopenObjectListCANopenObjectCANopenSubObjectAccessType), accesstype.ToString());
AppLayer.CANopenObjectList.CANopenObject[count].CANopenSubObject[subcount].accessTypeSpecified = true;

AppLayer.CANopenObjectList.CANopenObject[count].CANopenSubObject[subcount].highLimit = subod.HighLimit;
AppLayer.CANopenObjectList.CANopenObject[count].CANopenSubObject[subcount].lowLimit = subod.LowLimit;
AppLayer.CANopenObjectList.CANopenObject[count].CANopenSubObject[subcount].actualValue = subod.actualvalue;


subcount++;
}
}
Expand Down Expand Up @@ -1049,6 +1058,10 @@ public EDSsharp convert(ISO15745ProfileContainer container)

subentry.uniqueID = subobj.uniqueIDRef;

subentry.HighLimit = subobj.highLimit;
subentry.LowLimit = subobj.lowLimit;
subentry.actualvalue = subobj.actualValue;

//FIXME WTF is going on here??
entry.subobjects.Add(subobj.subIndex[1], subentry);

Expand Down

0 comments on commit 9931703

Please sign in to comment.