CANopenNode / CANopenEditor

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

Wrong naming for records and array #40

Closed xGreenPandax closed 1 year ago

xGreenPandax commented 1 year ago

With new release v4.0-102-g634dee9 i have a problem with "ODT_RECORD" and "ODT_ARRAY", because in CANopenNode/301/CO_ODinterface.c it's called "ODT_REC" and "ODT_ARR".

@Barzello

trojanobelix commented 1 year ago

Uuups. Using V4? Can you put some context lines lines of the created c file (OD.c/h or CO_OD.c/h)

xGreenPandax commented 1 year ago

{0x2106, 0x01, ODT_VAR, &ODObjs.o_2106_power_onCounter, NULL}, {0x2107, 0x06, ODT_ARRAY, &ODObjs.o_2107_performance, NULL}, {0x2108, 0x02, ODT_ARRAY, &ODObjs.o_2108_temperature, NULL}, {0x2109, 0x02, ODT_ARRAY, &ODObjs.o_2109_voltage, NULL}, {0x2110, 0x11, ODT_ARRAY, &ODObjs.o_2110_variableInt32, NULL}, {0x2111, 0x11, ODT_ARRAY, &ODObjs.o_2111_variableROM_Int32, NULL}, {0x2112, 0x11, ODT_ARRAY, &ODObjs.o_2112_variableNV_Int32, NULL}, {0x2120, 0x06, ODT_RECORD, &ODObjs.o_2120_testVar, NULL}, {0x2121, 0x05, ODT_RECORD, &ODObjs.o_2121_inputVar, NULL}, {0x2130, 0x04, ODT_RECORD, &ODObjs.o_2130_time, NULL}, {0x2301, 0x09, ODT_RECORD, &ODObjs.o_2301_traceConfig, NULL}, {0x2302, 0x09, ODT_RECORD, &ODObjs.o_2302_traceConfig, NULL}, {0x2400, 0x01, ODT_VAR, &ODObjs.o_2400_traceEnable, NULL}, {0x2401, 0x07, ODT_RECORD, &ODObjs.o_2401_trace, NULL}, {0x2402, 0x07, ODT_RECORD, &ODObjs.o_2402_trace, NULL}, {0x6200, 0x11, ODT_ARRAY, &ODObjs.o_6200_simpleRelays, NULL}, {0x6401, 0x0D, ODT_ARRAY, &ODObjs.o_6401_readAnalogueInput16Bit, NULL}, {0x6411, 0x09, ODT_ARRAY, &ODObjs.o_6411_writeAnalogueOutput16Bit, NULL},

trojanobelix commented 1 year ago

Got it, please try the latest bugfix branch (029e57e273771e8e8d667e2cb1ade25f39ed30c4)

xGreenPandax commented 1 year ago

Sorry for the delay. It looks correct. Could you provide binaries?

trojanobelix commented 1 year ago

Yes, but it might take some days.

trojanobelix commented 1 year ago

Released v4.0-103-g029e57e

CANopenNode commented 1 year ago

It is still not fixed. I think, the line 172 in https://github.com/CANopenNode/CANopenEditor/commit/029e57e273771e8e8d667e2cb1ade25f39ed30c4 should be: odObjectType = odObjectType.Substring(0, 3);

(Source of the problem: https://github.com/robincornelius/libedssharp/commit/af4d323768b8e065ba6cd7b022a7561671cf507d#diff-d444f21db6a5f27fef9ee46f265a188fc674e24a1502b1150256ac81bf2fa2fb)

I did a quick check. Otherwise exporter to V4 seems to produce correct output.

Could you provide new binaries?

trojanobelix commented 1 year ago

Janez, you are absolutely right. Sorry, I must have deleted it by mistake. I will provide new binaries!

trojanobelix commented 1 year ago

Done, please test and close if successfully.

CANopenNode commented 1 year ago

It works, thanks.