DigitalGlitchFilter¶
-
class
wpilib.DigitalGlitchFilter[source]¶ Bases:
wpilib.SensorBaseClass to enable glitch filtering on a set of digital inputs. This class will manage adding and removing digital inputs from a FPGA glitch filter. The filter lets the user configure the time that an input must remain high or low before it is classified as high or low.
-
add(input)[source]¶ Assigns the
DigitalSource,Encoder, orCounterto this glitch filter.Parameters: input – Object to add
-
filterAllocated= [False, False, False]¶
-
getPeriodCycles()[source]¶ Gets the number of FPGA cycles that the input must hold steady to pass through this glitch filter.
Returns: The number of cycles.
-
getPeriodNanoSeconds()[source]¶ Gets the number of nanoseconds that the input must hold steady to pass through this glitch filter.
Returns: The number of nanoseconds.
-
mutex= <_thread.lock object>¶
-