render

package
v0.0.0-...-c6c79d5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ROWS          = 4
	COLUMNS       = 16
	COLS_PER_BEAT = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LedRenderer

type LedRenderer interface {
	Init(
		freq int,
		gpioPin1 int, ledCount1 int, brightness1 int,
		gpioPin2 int, ledCount2 int, brightness2 int,
	) error

	Fini()
	Render() error
	Wait() error
	SetLed(channel int, index int, value uint32)
	Clear()
	SetBitmap(channel int, a []uint32)
}

type Renderer

type Renderer interface {
	Render(state State)
}

type State

type State struct {
	LEDs        [ROWS][COLUMNS]uint32
	Transitions [ROWS][COLUMNS]Transition
}

type Terminal

type Terminal struct{}

func InitTerminal

func InitTerminal() *Terminal

func (*Terminal) Render

func (t *Terminal) Render(state State)

func (*Terminal) TBprint

func (t *Terminal) TBprint(x, y int, msg string)

TODO: dry up

type Transition

type Transition struct {
	Color    uint32
	Location float64 // [0,1]
	Length   float64 // [0,1]
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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