jgeisler0303 / CANFestivino

Arduino Library Version of CANFestival CANopen Stack
GNU Lesser General Public License v2.1
51 stars 17 forks source link

Need SetNodeId #11

Open robybozz opened 6 years ago

robybozz commented 6 years ago

Hi, I'm not a good programmer, I'm developing a project with 9 slaves, so I was wondering if it was possible to update the library to implement the SetNodeId or if you can give me instructions on how to do it. Thanks in advance.

jgeisler0303 commented 6 years ago

Unfortunately I changed the code so that setting the node ID is not possible anymore. This was necessary in order to fit the whole code into the small memory of the atmega328. There is a function setNodeID that could be enabled via a special define but it would probably not compile any more.

So, the best and and currently only way to have devices with different node IDs is to flash each device with a different node ID hard coded in the program code. For this you need to set the ID in the objdictgen tool and generate a separate ObjDict.cpp for each device.