dronecan / gui_tool

MIT License
27 stars 30 forks source link

NodeStatus not received when custom DSDLs are loaded. #27

Open dernatsch opened 2 years ago

dernatsch commented 2 years 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 2 years ago

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

FelixEL commented 4 months ago

this is a pydronecan problem. I confirm the same behavior where loading custom DSDL deactivates other definitions.