TubesLayout
Source:
TubesLayout.h
TubesLayout¶
src/light/layouts/TubesLayout.h:17Inherits:
LayoutBase
Layout of parallel LED tubes.
Author: MoonLight, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Layouts/L_MoonLight.h
Public Attributes¶
lengthType nrOfTubes = 4
: How many tubes stand side by side.
lengthType ledsPerTube = 54
: How many lights each tube carries.
lengthType tubeDistance = 10
: The spacing between tubes, in light-units.
bool reversed = false
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¶
Parallel vertical tubes: nrOfTubes single columns, each ledsPerTube lights tall, spaced tubeDistance apart along x (each tube's z stays 0). Tube t sits at x = t * tubeDistance; within a tube y runs 0..ledsPerTube-1, or reversed when reversed is set (the strip enters the column from the top). Wiring order is tube-major: all of tube 0's lights, then tube 1's, and so on, matching MoonLight's outer tube loop over an inner single-column emit.
Prior art: MoonLight TubesLayout (github.com/ewowi/MoonLight), which composes SingleColumnLayout per tube. MoonLight emits coordinates only; the driver owns pin assignment, so MoonLight's per-column nextPin() plumbing is dropped.