13template <
typename T, fl::size N = 0>
16 "MedianFilter: N must be odd for an unambiguous median");
23 FL_ERROR(
"MedianFilter: capacity should be odd, adding 1");
31 for (fl::size i = 0; i < values.
size(); ++i) {
32 mRing.push_back(values[i]);
48 fl::size idx =
static_cast<fl::size
>(
pos - base);
55 T oldest =
mRing.front();
58 fl::size rm =
static_cast<fl::size
>(rm_pos - base);
64 fl::size idx =
static_cast<fl::size
>(ins_pos - base);
71 mRing.push_back(input);
88 if (new_capacity % 2 == 0) {
89 FL_ERROR(
"MedianFilter: capacity should be odd, adding 1");
constexpr fl::size size() const FL_NOEXCEPT
Centralized logging categories for FastLED hardware interfaces and subsystems.
Compile-time linker keep-alive hook for a single fl::Bus.
void sort(Iterator first, Iterator last, Compare comp) FL_NOEXCEPT
Iterator lower_bound(Iterator first, Iterator last, const T &value, Compare comp) FL_NOEXCEPT
Base definition for an LED controller.
Portable compile-time assertion wrapper.