vedirect icon indicating copy to clipboard operation
vedirect copied to clipboard

packet is not cleared between callbacks

Open kjkoster opened this issue 3 years ago • 1 comments

Thank you for publishing this code.

I found that packets are not cleared between call-back invocations. This means that the packet dict may contain lingering values from previous callbacks and not only data from the very last message out of the MPPT.

To reproduce, simply add a key+value to the packet in the callback and note that it is retained across callbacks.

kjkoster avatar Aug 30 '21 18:08 kjkoster

I work around this by calling packet.clear() at the end of my callback implementation. Not pretty, but effective.

kjkoster avatar Aug 30 '21 18:08 kjkoster