pub struct Seg {Show 29 fields
pub id: Option<i16>,
pub start: Option<u16>,
pub stop: Option<u16>,
pub len: Option<u16>,
pub grp: Option<u8>,
pub spc: Option<u8>,
pub of: Option<i16>,
pub on: Option<bool>,
pub frz: Option<bool>,
pub bri: Option<u8>,
pub cct: Option<u16>,
pub set: Option<u8>,
pub name: Option<String>,
pub col: Option<Vec<Vec<u8>>>,
pub fx: Option<u16>,
pub sx: Option<u8>,
pub ix: Option<u8>,
pub pal: Option<u16>,
pub c1: Option<u8>,
pub c2: Option<u8>,
pub c3: Option<u8>,
pub sel: Option<bool>,
pub rev: Option<bool>,
pub mi: Option<bool>,
pub o1: Option<bool>,
pub o2: Option<bool>,
pub o3: Option<bool>,
pub si: Option<u8>,
pub m12: Option<u8>,
}
Fields§
§id: Option<i16>
-1 to info.maxseg -1; Zero-indexed ID of the segment. May be omitted, in that case the ID will be inferred from the order of the segment objects in the seg array. -1 means apply to all selected segments
start: Option<u16>
0 to info.leds.count -1; LED the segment starts at.
stop: Option<u16>
0 to info.leds.count; LED the segment stops at, not included in range. If stop is set to a lower or equal value than start (setting to 0 is recommended), the segment is invalidated and deleted.
len: Option<u16>
0 to info.leds.count; Length of the segment (stop - start). stop has preference, so if it is included, len is ignored.
grp: Option<u8>
Grouping (how many consecutive LEDs of the same segment will be grouped to the same color)
spc: Option<u8>
Spacing (how many LEDs are turned off and skipped between each group)
of: Option<i16>
-len+1 to len; Offset (how many LEDs to rotate the virtual start of the segments, available since 0.13.0)
on: Option<bool>
Turns on and off the individual segment. (available since 0.10.0)
frz: Option<bool>
freezes/unfreezes the current effect
bri: Option<u8>
Sets the individual segment brightness (available since 0.10.0)
cct: Option<u16>
0 to 255 or 1900 to 10091; White spectrum color temperature (available since 0.13.0)
set: Option<u8>
Undocumented?????? TODO
// 14-15 : 0-3 UI segment sets/groups -WLED source
name: Option<String>
The name of the segment. Names are not present by default. if this is none, use “Segment{id}” to match the WLED UI
col: Option<Vec<Vec<u8>>>
Array that has up to 3 color arrays as elements, the primary, secondary (background) and tertiary colors of the segment. Each color is an array of 3 or 4 bytes, which represent an RGB(W) color.
fx: Option<u16>
0 to info.fxcount -1; ID of the effect or ~ to increment, ~- to decrement, or r for random.
sx: Option<u8>
Relative effect speed. ~ to increment, ~- to decrement. ~10 to increment by 10, ~-10 to decrement by 10.
ix: Option<u8>
Effect intensity. ~ to increment, ~- to decrement. ~10 to increment by 10, ~-10 to decrement by 10.
pal: Option<u16>
0 to info.palcount -1; ID of the color palette or ~ to increment, ~- to decrement, or r for random.
c1: Option<u8>
Effect custom slider 1. Custom sliders are hidden or displayed and labeled based on effect metadata.
c2: Option<u8>
Effect custom slider 2.
c3: Option<u8>
0 to 31; Effect custom slider 3.
sel: Option<bool>
true if the segment is selected. Selected segments will have their state (color/FX) updated by APIs that don’t support segments (e.g. UDP sync, HTTP API). If no segment is selected, the first segment (id:0) will behave as if selected. WLED will report the state of the first (lowest id) segment that is selected to APIs (HTTP, MQTT, Blynk…), or mainseg in case no segment is selected and for the UDP API. Live data is always applied to all LEDs regardless of segment configuration.
rev: Option<bool>
Flips the segment, causing animations to change direction.
mi: Option<bool>
Mirrors the segment (available since 0.10.2)
o1: Option<bool>
Effect option 1. Custom options are hidden or displayed and labeled based on effect metadata.
o2: Option<bool>
Effect option 2.
o3: Option<bool>
Effect option 3.
si: Option<u8>
0 to 3; Setting of the sound simulation type for audio enhanced effects. (0: ‘BeatSin’, 1: ‘WeWillRockYou’, 2: ‘10_3’, 3: ‘14_3’) (as of 0.14.0-b1, there are these 4 types defined)
m12: Option<u8>
0 to 4 [map1D2D.count]; Setting of segment field ‘Expand 1D FX’. (0: Pixels, 1: Bar, 2: Arc, 3: Corner)