robincornelius / libedssharp

A CanOpen EDS editor and library in C# with CanOpenNode export for Object Dictionary
GNU General Public License v3.0
227 stars 134 forks source link

Duplicate PDO_MappingEntry definitions #222

Open seclorum opened 4 years ago

seclorum commented 4 years ago

Hi,

Attempting to auto-generate CO_OD.? for my project, I fire up EDSEditor v0.8 (built from the latest sources as of issue date), and export the CO_OD.? files .. but when I attempt to use the files un-edited, I get this:

./CO_OD.h:120:31: error: duplicate member 'PDO_MappingEntry' UNSIGNED32 PDO_MappingEntry; .. which spews on for a while, since there are many duplicate definitions ..

Is this something I'm doing wrong with the EDSEditor itself? FWIW, I take EDS files created directly from Lenze Engineer HighLevel V2.28.0.0 without any modifications, open them in EDSEditor, and do a simple export (CANOPEN_V2) .. obviously I can fix up the files by hand myself, but it would be better (I think) to know what is happening here and whether I can fix this in the pipeline somehow ..

robincornelius commented 4 years ago

I think this is related to #223 and is caused by the last release of 0.8 being out of date with latest development of canopennode.

Please try https://github.com/robincornelius/libedssharp/raw/gh-pages/build/OpenEDSEditor-latest.zip and remember in tools->preferences there is a option to choose the legacy exporter (0,8 version) or the new exporter which is attempting to follow the canopennode tip and will eventually be stabilised at a particular version and a new option added