CANopenNode / CANopenEditor

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

Issues with RX PDO Mapping #8

Closed johndcollins closed 2 years ago

johndcollins commented 3 years ago

I have a EDS with 40 writeable analog outputs. I'm trying to map these on the RX PDO Mapping screen, but running into issues.

It seems the Getbase(string defaultvalue) function is returning the wrong fromBase number for different values. For example 0c will return base 10 instead of 16 and 08 will return base 8 instead of 10. So it's impossible to map these outputs to the PDO.

I think the list items should have the 0x in front of the sub entry. It's even mentioned in code in the file DevicePDOView2.cs : UInt16 newindex = EDSsharp.ConvertToUInt16(bits[0]); //warning if the subindex is still hex the converter will not know about it //we may need to append 0x to keep it correct UInt16 newsubindex = EDSsharp.ConvertToUInt16(bits[1]);

Example

johndcollins commented 3 years ago

I tried to make a quick hotfix which seems to have fixed the error and it seems that this is the issue : Example2

Also, I discovered another issue. If I drag an item to the last position, it gets placed in the slot before. So if I drag it to byte 6-7 in my case it switches place with byte 4-5 Even if I remove byte 6-7, it removed byte 4-5 instead.

johndcollins commented 3 years ago

Forgot I also changed this: Example5

trojanobelix commented 2 years ago

It should be fixed now in the new "bugfix" branch. Also the drag and drop issue. But the pattern for octal is set to "@^0[0-7]+" not "@^0[0-7]*$" so values with e.g. whitespace at the end it still matches.

It would be helpful if you could test the fix.