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

Updating Tx PDO mapping changes access privileges incorrectly #259

Open margce opened 3 years ago

margce commented 3 years ago

Hello,

I'm currently using the latest auto build v0.8-126 and when updating the Tx PDO or Rx PDO Mappings the app automatically changes the access privileges to and deletes the count labels of my project.

Here is the before and after of one of the entries as an example

`

        <q1:dataTypeIDRef uniqueIDRef="UID_REC_1800" />
        <q1:property name="CO_countLabel" value="TPDO" />
        <q1:property name="CO_storageGroup" value="PERSIST_COMM" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180000" access="readWrite">
        <label lang="en">max sub-index</label>
        <USINT />
        <q1:defaultValue value="6" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180001" access="readWrite">
        <label lang="en">COB-ID used by TPDO</label>
        <UDINT />
        <q1:defaultValue value="0x180" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180002" access="readWrite">
        <label lang="en">transmission type</label>
        <USINT />
        <q1:defaultValue value="254" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180003" access="readWrite">
        <label lang="en">inhibit time</label>
        <UINT />
        <q1:defaultValue value="100" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180004" access="readWrite">
        <label lang="en">compatibility entry</label>
        <USINT />
        <q1:defaultValue value="0" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180005" access="readWrite">
        <label lang="en">event timer</label>
        <UINT />
        <q1:defaultValue value="0" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180006" access="readWrite">
        <label lang="en">SYNC start value</label>
        <USINT />
        <q1:defaultValue value="0" />
      </q1:parameter>`

After accessing the Tx PDO mapping and saving changes this happens to the TPDO info, note how the count label gets erased and the access for every field has changed to noAccess, the same happens to TPDO mapping parameters items on 0x1A00...

`

        <q1:dataTypeIDRef uniqueIDRef="UID_REC_1800" />

        <q1:property name="CO_storageGroup" value="PERSIST_COMM" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180000" access="noAccess">
        <label lang="en">max sub-index</label>
        <USINT />
        <q1:defaultValue value="6" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180001" access="noAccess">
        <label lang="en">COB-ID used by TPDO</label>
        <UDINT />
        <q1:defaultValue value="0x180" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180002" access="noAccess">
        <label lang="en">transmission type</label>
        <USINT />
        <q1:defaultValue value="254" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180003" access="noAccess">
        <label lang="en">inhibit time</label>
        <UINT />
        <q1:defaultValue value="100" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180004" access="noAccess">
        <label lang="en">compatibility entry</label>
        <USINT />
        <q1:defaultValue value="0" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180005" access="noAccess">
        <label lang="en">event timer</label>
        <UINT />
        <q1:defaultValue value="0" />
      </q1:parameter>
      <q1:parameter uniqueID="UID_SUB_180006" access="noAccess">
        <label lang="en">SYNC start value</label>
        <USINT />
        <q1:defaultValue value="0" />
      </q1:parameter>`
StormOli commented 3 years ago

I have the same issues when editing PDOs. I've created a pull request that appears to fix the issue.