Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packet is not cleared between callbacks #10

Open
kjkoster opened this issue Aug 30, 2021 · 1 comment
Open

packet is not cleared between callbacks #10

kjkoster opened this issue Aug 30, 2021 · 1 comment

Comments

@kjkoster
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant