CANopenNode / CANopenEditor

CANopen Object Dictionary Editor
GNU General Public License v3.0
122 stars 60 forks source link

Compile errors from OD.h and OD.c due to PDO modification #2

Closed woudie closed 1 year ago

woudie commented 3 years ago

Hi,

I've been trying to re-map some PDOs using CANopenEdtior, but for some reason, the generated OD.h and OD.c seem to fail when trying to compile with the rest of my source code. After some trial and error, I figured that this occurs only after editing a PDO. The error log is shown in the image. Any advice or assistance on resolving this issue would be greatly appreciated!

Screenshot 2021-07-12 11:23:22

woudie commented 3 years ago

Additionally, it seems that the missing attributes were all SDO permissions and it also seems that all the counters of OD objects in the OD.h were missing as well.

woudie commented 3 years ago

Newer update: Most of this problem seems to occur when I try using the TPDO or RPDO tab, but if I use the object dictionary tab to edit the PDOs, it seems mostly fine. I say mostly because the counters of OD objects in the OD.h were still screwed up, but at least I was able to modify the PDOs.

nkonidaris commented 2 years ago

I'm facing the same problem, is there any update on a fix for this or have I misconfigured the PDOs ? image

woudie commented 2 years ago

From what I remember, the RPDO and TPDO mapping tabs are completely broken. By that I mean, the generated OD after modifying anything on those tabs will break your OD even if you enter everything correctly. As long as you only use the Object Dictionary tab, your generated OD will be fine. Hopefully somebody comes along and fixes those tabs haha

koson commented 2 years ago

Hi, I've found the (probably) cause of this problem in the method cs public void buildmappingsfromlists() at line 292 of this file https://github.com/CANopenNode/CANopenEditor/blob/main/libEDSsharp/PDOHelper.cs they create new OD tree with cs ODentry config = new ODentry(); But the value of sub.accesstype was initialized to "UNKNOWN"

At the first, I tried to add sub.accesstype = slot.configAccessType but no luck,

Does anyone know how to assign this accesstype?, I think it will solve the problems.

koson commented 2 years ago

After some search, I've found this PR -> https://github.com/CANopenNode/CANopenEditor/pull/1/commits/fc4785706bcfc5529006d60237a5a8f4b17f73cf

Simon-Thome commented 2 years ago

I have also noticed that any comments in the PDO descriptions in the OD tab get removed when modifying the PDO mapping tab

andrew-elder commented 2 years ago

Has this been fixed in mainline code yet?

Regelink commented 2 years ago

No, pull request #1 needs to be merged by the maintainer. In the mean time, feel free to use my fork Regelink/CANopenEditor

trojanobelix commented 2 years ago

Can someone provide an xdd to reproduce this behavior?

CANopenNode commented 2 years ago

I apologize for my inactivity here. I currently can't find my time to be more active. (But at least I receive notifications from now on.)

@trojanobelix is now co-maintainer. Thank you for your recent commits to the repo.

trojanobelix commented 1 year ago

TPDO or RPDO tab should be fixed in the bugfix branch. Please test and create a new issue if still something wrong.