SingleRowLayout
Source:
SingleRowLayout.h
SingleRowLayout¶
src/light/layouts/SingleRowLayout.h:19Inherits:
LayoutBase
Layout of one horizontal LED row (1D).
Author: MoonLight, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Layouts/L_MoonLight.h
Public Attributes¶
uint8_t startX = 0
: First x of the row. uint8_t (0..255), MoonLight's exact type/range.
uint16_t width = 30
: Number of lights in the row. uint16_t, 1..1000, MoonLight's exact range.
uint16_t yPosition = 0
: Row index (y). uint16_t storage, 0..255 range, MoonLight's exact bounds.
bool reversedOrder = false
: Wire the row from the high-x end back to start_x (index 0 at x=start_x+width-1).
Public Methods¶
virtual inline const char * tags() const override
: The catalog tags this layout carries.
virtual inline Dim dimensions() const override
: How many axes this layout places lights on.
virtual inline void defineControls() override
: The controls a user sets on the card.
virtual inline nrOfLightsType lightCount() const override
: How many lights the current settings place.
virtual inline void placeLights(const CoordSink & sink) const override
: Emit every light's coordinate, in wiring order.
More info¶
A single horizontal row of lights: width lights along the x-axis starting at start_x, all sharing row yposition (y) at z=0. The 1D strip primitive, a bare LED strip laid out straight. reversedOrder flips the wiring direction, so driver index 0 lands at the high-x end instead of the low-x end. The emitted coordinates are identical either way and only the index-to-position order changes, the same distinction GridLayout draws for serpentine wiring.
Prior art: MoonLight's SingleRowLayout (L_MoonLight.h), the same start, width, y-position and reversed fields. We drop MoonLight's per-strip pin plumbing (the ledPinDIO select, its "LED NN" pin menu, and nextPin()): a MoonLight layout emits coordinates only, the driver owns pin assignment.