triones

package
v0.0.0-...-f8c32d9 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(ctx context.Context, req Request, logger *log.Logger) error

Types

type Request

type Request struct {
	Kind          RequestKind
	BluetoothAddr string
	RgbOpts       *RgbOpts
	WhiteOpts     *WhiteOpts // use only if the strip has separate white channel (RGBW strip)
}

func RequestOff

func RequestOff(bluetoothAddr string) Request

func RequestOn

func RequestOn(bluetoothAddr string) Request

func RequestRGB

func RequestRGB(bluetoothAddr string, r, g, b uint8) Request

func RequestWhite

func RequestWhite(bluetoothAddr string, brightness uint8) Request

type RequestKind

type RequestKind int
const (
	RequestKindOn RequestKind = iota
	RequestKindOff
	RequestKindRGB
	RequestKindWhite
)

type RgbOpts

type RgbOpts struct {
	Red   uint8
	Green uint8
	Blue  uint8
}

type WhiteOpts

type WhiteOpts struct {
	Brightness uint8
}

Jump to

Keyboard shortcuts

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