Renaming Node / ECU via rename_ecu should clear out any existing transmitter and receiver
Hi,
I noticed a problem (bug?) in the db.rename_ecu method and specifically the usage of the frame.update_receiver() method.
The method should cover a rename attempt of an existing ECU throughout the complete database:
- Any existing usage of an ECU with the old name is removed from frames transmitter and signals receiver list - works as expected.
- Then it calls
frame.update_receiver()to make sure the frame's signal receiver list is propagated to the frame itself.
But here a catch as the frame's receiver list is not cleared / emptied before (!) updating the list, so any previous occurance of any ECU (e.g. the ECU with the old name) is still carried over.
So the correct method should empty the receiver array of the frame before updating it via the signals receiver list.
Any interest in fixing this - if not should I raise a PR?
Hi @ChristianSteffens ,
for sure, yes, feel free to raise an PR
should be merged