FastLED 3.10.8
Loading...
Searching...
No Matches
fx1d.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/int.h"
4#include "fl/math/xmap.h"
5#include "fl/fx/fx.h"
6#include "fl/stl/noexcept.h"
7
8namespace fl {
9
10// Abstract base class for 1D effects that use a strip of LEDs.
11class Fx1d : public Fx {
12 public:
13 Fx1d(u16 numLeds) FL_NO_EXCEPT : Fx(numLeds), mXMap(numLeds, false) {}
14 void setXmap(const XMap &xMap) FL_NO_EXCEPT { mXMap = xMap; }
15
16 u16 xyMap(u16 x) const FL_NO_EXCEPT { return mXMap.mapToIndex(x); }
17
18 protected:
20};
21
22} // namespace fl
void setXmap(const XMap &xMap) FL_NO_EXCEPT
Definition fx1d.h:14
u16 xyMap(u16 x) const FL_NO_EXCEPT
Definition fx1d.h:16
XMap mXMap
Definition fx1d.h:19
Fx1d(u16 numLeds) FL_NO_EXCEPT
Definition fx1d.h:13
Fx(u16 numLeds) FL_NO_EXCEPT
Definition fx.h:23
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
Base definition for an LED controller.