Skip to content

Commit

Permalink
* PDOs are not recounted when adding new, removing or inserting a new…
Browse files Browse the repository at this point in the history
… profile. Fixes #40

They are recounted if the file is saved and loaded again. If PDOs are manually added to
the object dictionary then they still will not be counted until the file is save/loaded

* Default DS301 profile contained an example PDO mapping to an object that is not included within the profile
  • Loading branch information
robincornelius committed Dec 8, 2016
1 parent b20bbf8 commit 211df33
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 71 deletions.
2 changes: 2 additions & 0 deletions EDSTest/DevicePDOView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ private void button_addPDO_Click(object sender, EventArgs e)
}
else
{
eds.updatePDOcount();
doUpdatePDOs();
doUpdateOD();

Expand All @@ -504,6 +505,7 @@ private void button_deletePDO_Click(object sender, EventArgs e)
eds.ods.Remove(index);
eds.ods.Remove((UInt16)(index + 0x200));

eds.updatePDOcount();
doUpdatePDOs();
doUpdateOD();
}
Expand Down
7 changes: 6 additions & 1 deletion EDSTest/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ void ProfileAddClick(object sender, EventArgs e)
Device dev; //one day this will be multiple devices

eds = b.convert(coxml.dev);

dev = coxml.dev;

foreach(KeyValuePair<UInt16,ODentry> kvp in eds.ods)
Expand All @@ -104,8 +105,12 @@ void ProfileAddClick(object sender, EventArgs e)
dv.eds.ods.Add(kvp.Key, kvp.Value);
}


dv.dispatch_updateOD();
dv.dispatch_updatePDOinfo();

dv.eds.updatePDOcount();
dv.dispatch_updatedevice();

}
}
Expand Down
Loading

0 comments on commit 211df33

Please sign in to comment.