Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.58 KB

README.md

File metadata and controls

38 lines (28 loc) · 1.58 KB

Bounced

Crates.io Latest Version License codecov coveralls

A utility to debounce signals.

It has no dependencies (except for libcore) and no unsafe.

Debouncing is best thought of as a running average. It might also be thought of as a hysteresis of an input: if the input changes, it needs to head towards the new state consistently and for long enough.

Contains integration-type and shift-type (also with a specialization for integration-type) debouncers.

Compared to other debouncer libraries, it is extensible with your own debouncing algorithm.

TODO

  • random-noise type (for testing)

Other Uses

This library is probably generic enough so that if you have some input that upon meeting some desired history, the output could be some tri-state value (on, off, and None).

Other Projects

Projects similar to this include debouncr and debounced-pin.

Other inspirations include debounce.c.