SectionManager

interface SectionManager

Manages sections and subsections of this section.

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

Inheritors

Properties

Link copied to clipboard
abstract val name: String

The string used to identify this section

Link copied to clipboard
abstract 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
abstract 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
abstract 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

The sections managed by this section manager

Link copied to clipboard
abstract val stripManager: LEDStrip

The strip manager this section manager is managing sections for

Link copied to clipboard

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
abstract fun getPhysicalIndex(pixel: Int): Int

Get the appropriate index on the full strip for the specified pixel

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getSection(sectionName: String): Section

Get the section specified by sectionName. If it doesn't exist, return this 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