Skip to content

Prevent (potentially) inf. loop in levelTime() and levelTimePrecise() #5

@t-w

Description

@t-w

The 2 mentioned methods (introduced to fix #2 and #3) measure the time of a pin state by waiting for changing to another state (it is the only condition until now). While never experienced this with DHT11 which I use, the code measuring time could be stuck in an infinite loop in case the state never change (for whatever reason...).

The code should be more robust and prevent this potential problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions