Skip to content

Filters

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

Filter OnRising

Emits item if is greater than previous received item

OnRising()

Filter OnFalling

Emits item if is smaller than previous received item

OnFalling()

Filter MovingAverage

Emits the moving average of received items

MovingAverage(size_t N)

Filter Median3

Emits the median of three latest received items

Median3()

Filter Median5

Emits the median of five latest received items

Median5()

Filter LowPass

Emits the low pass filter of the received items

LowPass(const double alpha)

Filter HighPass

Emits the high pass filter of the received items

HighPass(const double alpha)

Filter StopBand

Emits the stop band filter of the received items

StopBand(const double alpha1, const double alpha2)

Filter PassBand

Emits the pass band filter of the received items

PassBand(const double alpha1, const double alpha2)

Filter Toggle

Emits an state that toggles each time an item is received

Toggle(bool state = false)

Filter 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)

Filter Debounce

Ignore items received after a time interval

Millis version

DebounceMillis(const unsigned long interval)

Micros version

DebounceMicros(const unsigned long interval)

Filter Window

WIP. Emits items received within a time interval

Millis version

WindowMillis(const uint8_t num, const unsigned long interval)

Micros version

WindowMicros(const uint8_t num, const unsigned long interval)

Filter Limit

Emits the received item cropped by a lower and upper limit

Limit(T lowerLimit, T upperLimit)

Filter LimitUpper

Emits the received item cropped by an upper limit

LimitUpper(T upperLimit)

Filter LimitLower

Emits the received item cropped by a lower limit

LimitLower(T lowerLimit)

Filter Scale

Emits the item received scaled

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

Filter IsLessOrEqual

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

IsLessOrEqual(T value)

Filter IsLess

Emits true if the received item is less than a value

IsLess(T value)

Filter IsGreaterOrEqual

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

IsGreaterOrEqual(T value)

Filter IsGreater

Emits true if the received item is great than a value

IsGreater(T value)

Filter IsEqual

Emits true if the received item is equal to a value

IsEqual(T value)

Filter IsNotEqual

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

IsNotEqual(T value)

Filter IsZero

Emits true if the received item is equal zero

IsZero(T value)

Filter IsNotZero

Emits true if the received item is not equal zero

IsNotZero(T value)
Clone this wiki locally