FastLED
3.9.15
Loading...
Searching...
No Matches
fx1d.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
stdint.h
>
4
5
#include "
fl/namespace.h
"
6
#include "
fl/xmap.h
"
7
#include "
fx/fx.h
"
8
9
namespace
fl
{
10
11
// Abstract base class for 1D effects that use a strip of LEDs.
12
class
Fx1d
:
public
Fx
{
13
public
:
14
Fx1d
(uint16_t numLeds) :
Fx
(numLeds),
mXMap
(numLeds, false) {}
15
void
setXmap
(
const
XMap
&xMap) {
mXMap
= xMap; }
16
17
uint16_t
xyMap
(uint16_t
x
)
const
{
return
mXMap
.mapToIndex(
x
); }
18
19
protected
:
20
XMap
mXMap
;
21
};
22
23
}
// namespace fl
x
int x
Definition
Audio.ino:71
fl::Fx1d::Fx1d
Fx1d(uint16_t numLeds)
Definition
fx1d.h:14
fl::Fx1d::setXmap
void setXmap(const XMap &xMap)
Definition
fx1d.h:15
fl::Fx1d::mXMap
XMap mXMap
Definition
fx1d.h:20
fl::Fx1d::xyMap
uint16_t xyMap(uint16_t x) const
Definition
fx1d.h:17
fl::Fx::Fx
Fx(uint16_t numLeds)
Definition
fx.h:23
fl::XMap
Definition
xmap.h:28
namespace.h
Implements the FastLED namespace macros.
fl
Implements a simple red square effect for 2D LED grids.
Definition
crgb.h:16
fx.h
stdint.h
xmap.h
fx
fx1d.h
Generated on Thu May 29 2025 04:44:57 for FastLED by
1.13.2