Skip to content

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

Closed
@kevinjwalters

Description

@kevinjwalters

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions