FastLED
3.9.3
Loading...
Searching...
No Matches
fx1d.h
1
#pragma once
2
3
#include <stdint.h>
4
5
#include "namespace.h"
6
#include "xmap.h"
7
#include "fx/fx.h"
8
9
FASTLED_NAMESPACE_BEGIN
10
11
// Abstract base class for 1D effects that use a strip of LEDs.
12
class
FxStrip
:
public
Fx
{
13
public
:
14
FxStrip
(uint16_t numLeds):
Fx
(numLeds), mXMap(numLeds,
false
) {}
15
void
setXmap(
const
XMap
& xMap) {
16
mXMap = xMap;
17
}
18
19
uint16_t xyMap(uint16_t x)
const
{
20
return
mXMap.mapToIndex(x);
21
}
22
23
protected
:
24
XMap
mXMap;
25
};
26
27
FASTLED_NAMESPACE_END
28
Fx
Definition
fx.h:16
FxStrip
Definition
fx1d.h:12
XMap
Definition
xmap.h:28
src
fx
fx1d.h
Generated on Thu Nov 14 2024 00:00:34 for FastLED by
1.11.0