CANopenNode / CANopenEditor

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

LSS Master/Slave parameters does not export to OD.c/h #67

Closed killdaclick closed 9 months ago

killdaclick commented 1 year ago

After switching the "LSS Master" or "LSS Slave" under Device Info->General and Master Features and generating the OD.c/h does not change the CNT_LSS_MST / CNT_LSS_SLV value in OD.h. It is always equal to zero as in below example:

(config).CNT_LSS_SLV = 0;\
(config).CNT_LSS_MST = 0;\
trojanobelix commented 1 year ago

I can confirm that "LSS Master" and "LSS Slave" under Device Info has no influence on the OD files.

The LSS slave setting are exported to an EDS as "LSS_Supported". This is compliant with DSP CiA 306 for EDS. It shall indicate if LSS functionality is supported (Boolean, 0 = not supported, 1 = supported)

I have no experience with LSS so unfortunately I cannot assess whether and how this should be used in the stack/ OD files.

Maybe Janez can contribute something.

killdaclick commented 1 year ago

I suppose it just needs to set only those values to corresponding '1'. When I have set this manually LSS is working both in Master and Slave. Those CNTLSS* are checked in the code.

CANopenNode commented 9 months ago

That is true for CANopenNode v1.3

For V4 you have to use CO_CONFIG_LSS macro from https://github.com/CANopenNode/CANopenNode/blob/master/301/CO_config.h

killdaclick commented 9 months ago

Do you understand that the GUI is not doing that? It is not changing anything. You have to manually edit the files, use macro or whatever. The GUI has no effect on the config file.

CANopenNode commented 9 months ago

Yes, of course. In V4 it is intentional, in LEGACY, you have to edit manually.