FastLED 3.9.15
Loading...
Searching...
No Matches
fx1d.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stdint.h"
4
5#include "fl/int.h"
6#include "fl/namespace.h"
7#include "fl/xmap.h"
8#include "fx/fx.h"
9
10namespace fl {
11
12// Abstract base class for 1D effects that use a strip of LEDs.
13class Fx1d : public Fx {
14 public:
15 Fx1d(u16 numLeds) : Fx(numLeds), mXMap(numLeds, false) {}
16 void setXmap(const XMap &xMap) { mXMap = xMap; }
17
18 u16 xyMap(u16 x) const { return mXMap.mapToIndex(x); }
19
20 protected:
22};
23
24} // namespace fl
int x
Definition simple.h:92
u16 xyMap(u16 x) const
Definition fx1d.h:18
void setXmap(const XMap &xMap)
Definition fx1d.h:16
Fx1d(u16 numLeds)
Definition fx1d.h:15
XMap mXMap
Definition fx1d.h:21
Fx(uint16_t numLeds)
Definition fx.h:23
Implements the FastLED namespace macros.
IMPORTANT!
Definition crgb.h:20