Skip to content

AdafruitSensorMeasurement does not allow a sequence number of 0 in constructor #8

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

Closed
kevinjwalters opened this issue May 27, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@kevinjwalters
Copy link

The constructor for AdafruitSensorMeasurement conditionally sets sequence_number based on testing the variable, 0 will evaluate to False causing no setting of the sequence_number.

if sequence_number:
self.sequence_number = sequence_number

Perhaps this was intended to be is not None?

The broadcast function in the same file does not use the construtor's arguments to set the sequence_number.

This is just from inspection, I've not executed the code...

@evaherrada evaherrada added the bug Something isn't working label Jun 30, 2020
@tannewt
Copy link
Member

tannewt commented Apr 1, 2021

Fixed by #19

@tannewt tannewt closed this as completed Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants