class wpimath.filter.Debouncer(debounceTime: wpimath.units.seconds, type: wpimath.filter._filter.Debouncer.DebounceType = <DebounceType.kRising: 0>)

Bases: pybind11_object

A simple debounce filter for boolean streams. Requires that the boolean change value from baseline for a specified period of time before the filtered value changes.

Creates a new Debouncer.

  • debounceTime – The number of seconds the value must change from baseline for the filtered value to change.

  • type – Which type of state change the debouncing will be performed on.

class DebounceType(value: int)

Bases: pybind11_object

Type of debouncing to perform.


kRising : Rising edge.

kFalling : Falling edge.

kBoth : Both rising and falling edges.

kBoth = <DebounceType.kBoth: 2>
kFalling = <DebounceType.kFalling: 1>
kRising = <DebounceType.kRising: 0>
property name
property value
calculate(input: bool) bool

Applies the debouncer to the input stream.


input – The current value of the input stream.


The debounced value of the input stream.