sportsmatrix

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServeWebUI     bool                `json:"serveWebUI"`
	HTTPListenPort int                 `json:"httpListenPort"`
	HardwareConfig *rgb.HardwareConfig `json:"hardwareConfig"`
	RuntimeOptions *rgb.RuntimeOptions `json:"runtimeOptions"`
	ScreenOffTimes []string            `json:"screenOffTimes"`
	ScreenOnTimes  []string            `json:"screenOnTimes"`
	WebBoardWidth  int                 `json:"webBoardWidth"`
	LaunchWebBoard bool                `json:"launchWebBoard"`
	WebBoardUser   string              `json:"webBoardUser"`
}

Config ...

func (*Config) Defaults

func (c *Config) Defaults()

Defaults sets some sane config defaults

type EmbedDir added in v0.0.7

type EmbedDir struct {
	http.FileSystem
}

EmbedDir is a wrapper to return index.html by default

func (EmbedDir) Open added in v0.0.7

func (d EmbedDir) Open(name string) (http.File, error)

Open implementation of http.FileSystem that falls back to serving /index.html

type SportsMatrix

type SportsMatrix struct {
	sync.Mutex
	// contains filtered or unexported fields
}

SportsMatrix controls the RGB matrix. It rotates through a list of given board.Board

func New

func New(ctx context.Context, logger *zap.Logger, cfg *Config, canvases []board.Canvas, boards ...board.Board) (*SportsMatrix, error)

New ...

func (*SportsMatrix) Close

func (s *SportsMatrix) Close()

Close closes the matrix

func (*SportsMatrix) GetImgCanvas added in v0.0.8

func (s *SportsMatrix) GetImgCanvas() (*imgcanvas.ImgCanvas, error)

GetImgCanvas checks the matrix for board.Canvas of type imgcanvas.ImgCanvas

func (*SportsMatrix) Serve

func (s *SportsMatrix) Serve(ctx context.Context) error

Serve blocks until the context is canceled

Jump to

Keyboard shortcuts

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