CANopenNode / CANopenEditor

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

Fix pdo access #24

Closed Regelink closed 1 year ago

Regelink commented 2 years ago

Fix https://github.com/CANopenNode/CANopenEditor/pull/9/commits/f3c307f669d9b41578230d53a2ef31b9c3048446 was incomplete which caused:

When I press Save Changes in the Object Dictionary tab, then Access PDO swaps from "r" to "t" and vica versa (so it alternates when I press Save Changes repeatedly)

clodnut commented 2 years ago

I'm still seeing TPDO/RPDO problems stemming from (I think) this commit.

I'm building/running Regelink's d0739eb, which includes this commit.

The changes to eds.cs from this commit don't (to me) make logical sense...

if (PDOtype == PDOMappingType.RPDO || accType == EDSsharp.AccessType.rwr)
                return libEDSsharp.AccessPDO.t;    // Surely it should be libEDSsharp.AccessPDO.r?

When I load an xdd file with a TPDO-capable object e.g.:

<CANopenSubObject subIndex="01" name="Button state" objectType="7" PDOmapping="TPDO" uniqueIDRef="UID_SUB_202001" />

it's listed as "Access PDO: r" in the GUI (and saves with PDOmapping="RPDO").

If I reverse the changes to eds.cs from this commit, then all is well.

CANopenNode commented 1 year ago

I think, all this has been fixed in the latest release.