FastLED
3.9.15
Loading...
Searching...
No Matches
segment.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
fl/stl/vector.h
"
4
#include "
fl/stl/string.h
"
5
6
namespace
fl
{
7
15
struct
WLEDSegment
{
16
u8
mId
= 0;
// Segment ID (0-255)
17
u16
mStart
= 0;
// Starting LED index (inclusive)
18
u16
mStop
= 0;
// Ending LED index (exclusive)
19
bool
mOn
=
true
;
// Segment power state
20
u8
mBri
= 255;
// Segment brightness (0-255)
21
22
// Color slots: each color is [R,G,B] or [R,G,B,W]
23
// Index 0: Primary color, Index 1: Secondary color, Index 2: Tertiary color
24
fl::vector<fl::vector<u8>
>
mColors
;
25
26
// Layout properties
27
u16
mLen
= 0;
// Segment length (alternative to stop, 0=use stop)
28
u8
mGrp
= 1;
// LED grouping factor (default 1)
29
u8
mSpc
= 0;
// Spacing between groups (default 0)
30
u16
mOf
= 0;
// Group offset (default 0)
31
32
// Effect properties
33
u8
mFx
= 0;
// Effect ID (0-fxcount-1)
34
u8
mSx
= 128;
// Effect speed (0-255, default 128)
35
u8
mIx
= 128;
// Effect intensity (0-255, default 128)
36
u8
mPal
= 0;
// Palette ID (0-palcount-1)
37
u8
mC1
= 128;
// Effect custom parameter 1 (0-255)
38
u8
mC2
= 128;
// Effect custom parameter 2 (0-255)
39
u8
mC3
= 16;
// Effect custom parameter 3 (0-255)
40
41
// Effect option flags
42
bool
mSel
=
false
;
// Segment selected for API control
43
bool
mRev
=
false
;
// Reverse segment direction
44
bool
mMi
=
false
;
// Mirror effect within segment
45
bool
mO1
=
false
;
// Effect option flag 1
46
bool
mO2
=
false
;
// Effect option flag 2
47
bool
mO3
=
false
;
// Effect option flag 3
48
49
// Other properties
50
u16
mCct
= 0;
// Color temperature (0-255 or Kelvin 1900-10091, 0=not set)
51
u8
mSi
= 0;
// Sound simulation mode (0-3)
52
u8
mM12
= 0;
// Segment mapping mode (0-3)
53
bool
mRpt
=
false
;
// Repeat segment pattern
54
fl::string
mName
;
// Segment name (optional)
55
56
// Individual LED control: stores per-LED colors as RGB triplets
57
// Each inner vector is [R,G,B] for a specific LED
58
fl::vector<fl::vector<u8>
>
mIndividualLeds
;
59
};
60
61
}
// namespace fl
fl::string
Definition
string.h:193
fl::vector
Definition
vector.h:449
fl::u8
unsigned char u8
Definition
stdint.h:131
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
fl::WLEDSegment::mM12
u8 mM12
Definition
segment.h:52
fl::WLEDSegment::mC3
u8 mC3
Definition
segment.h:39
fl::WLEDSegment::mC2
u8 mC2
Definition
segment.h:38
fl::WLEDSegment::mIx
u8 mIx
Definition
segment.h:35
fl::WLEDSegment::mFx
u8 mFx
Definition
segment.h:33
fl::WLEDSegment::mSel
bool mSel
Definition
segment.h:42
fl::WLEDSegment::mMi
bool mMi
Definition
segment.h:44
fl::WLEDSegment::mOf
u16 mOf
Definition
segment.h:30
fl::WLEDSegment::mSx
u8 mSx
Definition
segment.h:34
fl::WLEDSegment::mSpc
u8 mSpc
Definition
segment.h:29
fl::WLEDSegment::mO1
bool mO1
Definition
segment.h:45
fl::WLEDSegment::mGrp
u8 mGrp
Definition
segment.h:28
fl::WLEDSegment::mId
u8 mId
Definition
segment.h:16
fl::WLEDSegment::mO3
bool mO3
Definition
segment.h:47
fl::WLEDSegment::mBri
u8 mBri
Definition
segment.h:20
fl::WLEDSegment::mRpt
bool mRpt
Definition
segment.h:53
fl::WLEDSegment::mStop
u16 mStop
Definition
segment.h:18
fl::WLEDSegment::mOn
bool mOn
Definition
segment.h:19
fl::WLEDSegment::mLen
u16 mLen
Definition
segment.h:27
fl::WLEDSegment::mRev
bool mRev
Definition
segment.h:43
fl::WLEDSegment::mSi
u8 mSi
Definition
segment.h:51
fl::WLEDSegment::mColors
fl::vector< fl::vector< u8 > > mColors
Definition
segment.h:24
fl::WLEDSegment::mName
fl::string mName
Definition
segment.h:54
fl::WLEDSegment::mPal
u8 mPal
Definition
segment.h:36
fl::WLEDSegment::mCct
u16 mCct
Definition
segment.h:50
fl::WLEDSegment::mO2
bool mO2
Definition
segment.h:46
fl::WLEDSegment::mC1
u8 mC1
Definition
segment.h:37
fl::WLEDSegment::mIndividualLeds
fl::vector< fl::vector< u8 > > mIndividualLeds
Definition
segment.h:58
fl::WLEDSegment::mStart
u16 mStart
Definition
segment.h:17
fl::WLEDSegment
WLED segment configuration.
Definition
segment.h:15
string.h
vector.h
fl
fx
wled
segment.h
Generated on Tue Jun 16 2026 00:06:59 for FastLED by
1.13.2