Skip to content

Filters

Luis Llamas edited this page Apr 24, 2019 · 9 revisions

OnRising

Emits item if is greater than previous received item

OnRising()

OnFalling

Emits item if is smaller than previous received item

OnFalling()

MovingAverage

Emits the moving average of received items

MovingAverage(size_t N)

Median3

Emits the median of three latest received items

Median3()

Median5

Emits the median of five latest received items

Median5()

Threshold

Emits a status variable, which varies when the value received goes above or below a certain Threshold

Threshold(T threshold)
Threshold(T threshold, bool initialState)
Threshold(T lowThreshold, T highThreshold)
Threshold(T lowThreshold, T highThreshold, bool initialState)

LowPass

Emits the low pass filter of the received items

LowPass(const double alpha)

HighPass

Emits the high pass filter of the received items

HighPass(const double alpha)

StopBand

Emits the stop band filter of the received items

StopBand(const double alpha1, const double alpha2)

PassBand

Emits the pass band filter of the received items

PassBand(const double alpha1, const double alpha2)

Debounce

Ignore items received after a time intervall

Millis version

DebounceMillis(const unsigned long interval)

Micros version

DebounceMicros(const unsigned long interval)

Window

WIP. Emits items received within a time interval

Millis version

WindowMillis(const uint8_t num, const unsigned long interval)

Micros version

WindowMicros

WindowMicros(const uint8_t num, const unsigned long interval)

Limit

Emits the received item cropped by a lower and upper limit

Limit(T lowerLimit, T upperLimit)

LimitUpper

Emits the received item cropped by an upper limit

LimitUpper(T upperLimit)

LimitLower

Emits the received item cropped by a lower limit

LimitLower(T lowerLimit)

Scale

Emits the item received scaled

Scale(T input_min, T input_max, T output_min, T output_max)

IsLessOrEqual

Emits true if the received item is less or equal than a value

IsLessOrEqual(T value)

IsLess

Emits true if the received item is less than a value

IsLess(T value)

IsGreaterOrEqual

Emits true if the received item is great or equal than a value

IsGreaterOrEqual(T value)

IsGreater

Emits true if the received item is great than a value

IsGreater(T value)

IsEqual

Emits true if the received item is equal to a value

IsEqual(T value)

IsNotEqual

Emits true if the received item is not equal to a value

IsNotEqual(T value)

IsZero

Emits true if the received item is equal zero

IsZero(T value)

IsNotZero

Emits true if the received item is not equal zero

IsNotZero(T value)
Clone this wiki locally