dronecan / gui_tool

MIT License
23 stars 23 forks source link

NodeStatus not received when custom DSDLs are loaded. #27

Open dernatsch opened 1 year ago

dernatsch commented 1 year ago

When loading custom DSDL files in the startup dialog the NodeStatus monitor stops working. This is also true for an empty DSDL directory.

My analysis: After specifying a folder for custom DSDLs the method load_dsdl is called a second time and it replaces the contents of the DATATYPES dict. Because the datatype objects contain closures they are generated anew. The problem arises when a new frame is received and the frames datatype and the NodeStatus datatype are compared. It seems the NodeStatus datatype used in the comparison originates from the first load of the DSDL files and the datatype of the received frame orinates from the DATATYPES dict. Because of the closures this comparison returns False even if both messages have the NodeStatus type. There are multiple approaches to this problem that I can think of:

dtran11 commented 1 year ago

I see the same issue. Is this a problem with dronecan module or this gui project?