sportsmatrix

package
v0.0.85 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: GPL-3.0 Imports: 28 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"`
	WebBoardHeight        int                 `json:"webBoardHeight"`
	LaunchWebBoard        bool                `json:"launchWebBoard"`
	WebBoardUser          string              `json:"webBoardUser"`
	CombinedScroll        *atomic.Bool        `json:"combinedScroll"`
	CombinedScrollDelay   string              `json:"combinedScrollDelay"`
	CombinedScrollPadding int                 `json:"combinedScrollPadding"`
	// contains filtered or unexported fields
}

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 Server added in v0.0.63

type Server struct {
	// contains filtered or unexported fields
}

Server ...

func (*Server) GetStatus added in v0.0.83

func (s *Server) GetStatus(ctx context.Context, req *emptypb.Empty) (*pb.Status, error)

GetStatus ...

func (*Server) Jump added in v0.0.63

func (s *Server) Jump(ctx context.Context, req *pb.JumpReq) (*emptypb.Empty, error)

Jump ...

func (*Server) NextBoard added in v0.0.63

func (s *Server) NextBoard(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

NextBoard jumps to the next board in the sequence

func (*Server) RestartService added in v0.0.75

func (s *Server) RestartService(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

RestartService restarts the sportsmatrix service

func (*Server) ScreenOff added in v0.0.63

func (s *Server) ScreenOff(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

ScreenOff ...

func (*Server) ScreenOn added in v0.0.63

func (s *Server) ScreenOn(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

ScreenOn ...

func (*Server) SetAll added in v0.0.63

func (s *Server) SetAll(ctx context.Context, req *pb.SetAllReq) (*emptypb.Empty, error)

SetAll ...

func (*Server) SetLiveOnly added in v0.0.77

func (s *Server) SetLiveOnly(ctx context.Context, req *pb.LiveOnlyReq) (*emptypb.Empty, error)

SetLiveOnly sets the LiveOnly setting for SportBoards

func (*Server) SetStatus added in v0.0.83

func (s *Server) SetStatus(ctx context.Context, req *pb.Status) (*emptypb.Empty, error)

SetStatus ...

func (*Server) Version added in v0.0.63

func (s *Server) Version(ctx context.Context, req *emptypb.Empty) (*pb.VersionResp, error)

Version ...

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) AddBetweenBoard added in v0.0.74

func (s *SportsMatrix) AddBetweenBoard(board board.Board)

AddBetweenBoard adds a board to be run between each enabled board

func (*SportsMatrix) Close

func (s *SportsMatrix) Close()

Close closes the matrix

func (*SportsMatrix) JumpTo added in v0.0.59

func (s *SportsMatrix) JumpTo(ctx context.Context, boardName string) error

JumpTo jumps to a board with a given name

func (*SportsMatrix) ScreenOff added in v0.0.74

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

ScreenOff turns the matrix off

func (*SportsMatrix) ScreenOn added in v0.0.74

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

ScreenOn turns the matrix on

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