Skip to content

Class DigitalInputDevice: Missing factor 1000 in debouncing when recalculating stop time #101

@SmokeyBrandie

Description

@SmokeyBrandie

In this line https://github.com/RaspberryPiFoundation/picozero/blob/dev/picozero/picozero.py#L1601
the stop time is resetted, when state changes within debouncing time.

stop = ticks_ms() + self._bounce_time

From my point of view there is a missing "* 1000", because "self._bounce_time" is in seconds.

This line should be exactliy like the one above: https://github.com/RaspberryPiFoundation/picozero/blob/dev/picozero/picozero.py#L1597

stop = ticks_ms() + (self._bounce_time * 1000)

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