common

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	colorful.Color
}

Color in boblight format (components in range 0.0 - 1.0)

func (*Color) ToLifx

func (c *Color) ToLifx() (lifxColor common.Color)

ToLifx returns a golifx-compatible color

type LightMap

type LightMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

LightMap provides storage for the current light state

func NewLightMap

func NewLightMap() *LightMap

NewLightMap initializes a new LightMap

func (*LightMap) Get

func (l *LightMap) Get(id uint16) (color *Color, err error)

Get returns the last known state for the requested light ID, or error if unknown

func (*LightMap) Set

func (l *LightMap) Set(id uint16, color *Color)

Set sets a light ID to the provided Color

Jump to

Keyboard shortcuts

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