lights

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEffectNotFound = errors.New("light effect could not be found")

Functions

This section is empty.

Types

type Colormap

type Colormap []HSL

func ColormapRainbow

func ColormapRainbow(colors int) Colormap

type HSL

type HSL struct {
	H, S, L float64
}

func (*HSL) Get

func (c *HSL) Get() color.Color

func (*HSL) GetWithAlpha

func (c *HSL) GetWithAlpha(alpha uint8) color.Color

type LEDState

type LEDState struct {
	ColorIndex int64
	Brightness float64
}

type Renderer

type Renderer interface {
	ListEffects() []string
	LoadEffects(root string) error
	GetLEDCount() int
	GetGroupCount() map[string]int
	SetEffect(name string) error
	StopEffect(name string) error
	ReceiveFrame(func([][]LEDState))
}

func NewRenderer

func NewRenderer(name string, cfg common.Config) (Renderer, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL