StripInfo

data class StripInfo(val numLEDs: Int = 0, val pin: Int? = null, val brightness: Int = 255, val renderDelay: Long = 10, val isRenderLoggingEnabled: Boolean = false, val renderLogFile: String? = null, val rendersBetweenLogSaves: Int = 1000, val is1DSupported: Boolean = true, val is2DSupported: Boolean = false, val is3DSupported: Boolean = false, val ledLocations: List<Location>? = null) : SendableData

Data class for setting properties of a LED strip. (Done this way to simplify device libraries so they don't break if more properties are added)

Constructors

Link copied to clipboard
constructor(numLEDs: Int = 0, pin: Int? = null, brightness: Int = 255, renderDelay: Long = 10, isRenderLoggingEnabled: Boolean = false, renderLogFile: String? = null, rendersBetweenLogSaves: Int = 1000, is1DSupported: Boolean = true, is2DSupported: Boolean = false, is3DSupported: Boolean = false, ledLocations: List<Location>? = null)

Properties

Link copied to clipboard
val brightness: Int = 255

The brightness of the LEDs, a value between 0 and 255

Link copied to clipboard

Should 1D animations be included in the supported animations list

Link copied to clipboard
val is2DSupported: Boolean = false

Should 2D animations be included in the supported animations list

Link copied to clipboard
val is3DSupported: Boolean = false

Should 3D animations be included in the supported animations list

Link copied to clipboard

If logging should be enabled

Link copied to clipboard
val ledLocations: List<Location>? = null

Locations in 3D space of all LEDs. If null, strip is assumed to be one dimensional and with LEDs spaced equally.

Link copied to clipboard
val numLEDs: Int = 0

Number of LEDs in the strip

Link copied to clipboard
val pin: Int? = null

Physical pin the strip is connected to

Link copied to clipboard
val renderDelay: Long = 10

Delay between renders sent to the strip

Link copied to clipboard
val renderLogFile: String? = null

File to write log output to

Link copied to clipboard

Renders between log saves

Functions

Link copied to clipboard
open fun json(): ByteArray
Link copied to clipboard
open fun jsonString(): String
Link copied to clipboard
Link copied to clipboard