LEDStripSectionManager

Manages sections of the full strip.

A section can run full animations while subsections are used to run subanimations.

Constructors

Link copied to clipboard
constructor(stripManager: LEDStrip)

Properties

Link copied to clipboard
open override val name: String

The string used to identify this section

Link copied to clipboard
open override val numLEDs: Int

The number of pixels in this section

Link copied to clipboard

A list of the actual colors for the section

Link copied to clipboard

A list of the fade colors for the section

Link copied to clipboard
open override val pixelIndices: List<Int>

A list of the indices of the pixels in this section (range from 0 to numLEDs - 1)

Link copied to clipboard

A list of the prolonged colors for the section

Link copied to clipboard
open override val pixels: List<Int>

A list of all pixels included in this section

Link copied to clipboard

A list of the temporary colors for the section

Link copied to clipboard
open override val sections: MutableMap<String, Section>

The sections managed by this section manager

Link copied to clipboard
open override val stripManager: LEDStrip

The strip manager this section manager is managing sections for

Link copied to clipboard
open override val subSections: MutableMap<Int, Section>

The subsections managed by this section manager

Functions

Link copied to clipboard

Clear the section (set all pixels to 0)

Link copied to clipboard
open fun createSection(section: Section): Section
open fun createSection(name: String, pixels: List<Int>, parentSectionName: String = ""): Section
open fun createSection(name: String, startPixel: Int, endPixel: Int, parentSectionName: String = ""): Section
Link copied to clipboard
open override fun getPhysicalIndex(pixel: Int): Int

Returns the pixel specified. This function is usually used by sections whose first pixel is not pixel 0 on the parent section.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getSection(sectionName: String): Section
Link copied to clipboard
open fun getSectionOrNull(sectionName: String): Section?
Link copied to clipboard
open fun getSubSection(pixels: List<Int>): Section
open fun getSubSection(startPixel: Int, endPixel: Int): Section
Link copied to clipboard

Revert a pixel's color (reset its temporary color)

Link copied to clipboard

Revert multiple pixels' color (reset their temporary colors)

Link copied to clipboard

Set a pixel's fade color

Link copied to clipboard
Link copied to clipboard

Set a pixel's prolonged color

Link copied to clipboard

Set a pixel's temporary color

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard