Documentation ¶
Index ¶
- Variables
- type AnimationOptions
- type ConnectionReference
- type OpConfig
- type OpWLED
- func (o *OpWLED) Execute(ctx *base.Context, function string, vars map[string]string, ...) *base.OperatorIO
- func (o *OpWLED) GetArgSuggestions(fn string, arg string, otherArgs map[string]string) map[string]string
- func (o *OpWLED) GetFunctions() []string
- func (o *OpWLED) GetHook() interface{}
- func (o *OpWLED) GetName() string
- func (o *OpWLED) GetPossibleArgs(fn string) []string
- func (o *OpWLED) SetPixelMatrix(w *WLEDConverter, pmName string, animate AnimationOptions) *base.OperatorIO
- func (o *OpWLED) Shutdown(ctx *base.Context)
- func (o *OpWLED) StartListening(ctx *base.Context)
- type PixelMatrix
- type WLEDConfig
- type WLEDConverter
- func (w *WLEDConverter) DrawPixelMatrix(pm PixelMatrix) error
- func (w *WLEDConverter) GetPNG() *base.OperatorIO
- func (w *WLEDConverter) GetPixelMatrix() PixelMatrix
- func (w *WLEDConverter) Height() int
- func (w *WLEDConverter) PrepareStore() error
- func (w *WLEDConverter) ScaleImage(src image.Image)
- func (w *WLEDConverter) SendToWLED(cmd *base.OperatorIO, returnPNG bool) *base.OperatorIO
- func (w *WLEDConverter) SetPixel(x, y int, c color.Color) error
- func (w *WLEDConverter) SetPixelMatrix(pmName string) error
- func (w *WLEDConverter) StorePixelMatrix(ctx *base.Context, pmName string) error
- func (w *WLEDConverter) Width() int
- func (w *WLEDConverter) WriteString(s string, c color.Color, alignRight bool) error
- type WLEDRoot
- type WLEDSegment
- type WLEDState
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = OpConfig{Connections: map[string]WLEDConfig{}, DefaultConnection: "default"}
Functions ¶
This section is empty.
Types ¶
type AnimationOptions ¶
type ConnectionReference ¶ added in v1.3.0
type OpConfig ¶
type OpConfig struct { Connections map[string]WLEDConfig DefaultConnection string }
type OpWLED ¶
type OpWLED struct {
// contains filtered or unexported fields
}
func NewWLEDOp ¶
func NewWLEDOp(cr *utils.ConfigReader) *OpWLED
func (*OpWLED) Execute ¶
func (o *OpWLED) Execute(ctx *base.Context, function string, vars map[string]string, mainInput *base.OperatorIO) *base.OperatorIO
func (*OpWLED) GetArgSuggestions ¶
func (*OpWLED) GetFunctions ¶
func (*OpWLED) GetPossibleArgs ¶
func (*OpWLED) SetPixelMatrix ¶
func (o *OpWLED) SetPixelMatrix(w *WLEDConverter, pmName string, animate AnimationOptions) *base.OperatorIO
func (*OpWLED) StartListening ¶ added in v1.3.0
StartListening (noOp)
type PixelMatrix ¶
type PixelMatrix [][]string
func MakeDiagonalPixelMatrix ¶
func MakeDiagonalPixelMatrix(width int, height int, color string, bgcol string) PixelMatrix
func MakeZigZagPixelMatrix ¶ added in v1.3.0
func MakeZigZagPixelMatrix(width int, height int, color string, bgcol string) PixelMatrix
func (PixelMatrix) MoveLeft ¶
func (p PixelMatrix) MoveLeft(bgcol string, i int) PixelMatrix
func (PixelMatrix) MoveRight ¶
func (p PixelMatrix) MoveRight(bgcol string, i int) PixelMatrix
func (PixelMatrix) Shift ¶
func (p PixelMatrix) Shift(i int) PixelMatrix
type WLEDConfig ¶
type WLEDConfig struct { Width int `json:",string"` Height int `json:",string"` SegID int `json:",string"` Address string References []ConnectionReference }
WLEDConfig either describes a segment or references mutlipe other segments
func (*WLEDConfig) Validate ¶
func (c *WLEDConfig) Validate(requireNoReference bool) error
type WLEDConverter ¶
type WLEDConverter struct {
// contains filtered or unexported fields
}
func NewWLEDConverter ¶
func NewWLEDConverter(confName string, connections map[string]WLEDConfig) (*WLEDConverter, error)
NewWLEDConverter creates a connection to one or multiple WLED instances, the config might reference other configs
func (*WLEDConverter) DrawPixelMatrix ¶ added in v1.3.0
func (w *WLEDConverter) DrawPixelMatrix(pm PixelMatrix) error
func (*WLEDConverter) GetPNG ¶
func (w *WLEDConverter) GetPNG() *base.OperatorIO
func (*WLEDConverter) GetPixelMatrix ¶
func (w *WLEDConverter) GetPixelMatrix() PixelMatrix
func (*WLEDConverter) Height ¶ added in v1.3.0
func (w *WLEDConverter) Height() int
func (*WLEDConverter) PrepareStore ¶ added in v1.3.0
func (w *WLEDConverter) PrepareStore() error
func (*WLEDConverter) ScaleImage ¶
func (w *WLEDConverter) ScaleImage(src image.Image)
func (*WLEDConverter) SendToWLED ¶
func (w *WLEDConverter) SendToWLED(cmd *base.OperatorIO, returnPNG bool) *base.OperatorIO
SendToWLED sends a command to WLED, if cmd is nil, it sends the stored picture instead
func (*WLEDConverter) SetPixelMatrix ¶
func (w *WLEDConverter) SetPixelMatrix(pmName string) error
func (*WLEDConverter) StorePixelMatrix ¶ added in v1.3.0
func (w *WLEDConverter) StorePixelMatrix(ctx *base.Context, pmName string) error
func (*WLEDConverter) Width ¶ added in v1.3.0
func (w *WLEDConverter) Width() int
func (*WLEDConverter) WriteString ¶
type WLEDRoot ¶
type WLEDRoot struct { Seg WLEDSegment `json:"seg,omitempty"` // contains filtered or unexported fields }
func (*WLEDRoot) SendToWLED ¶ added in v1.3.0
func (root *WLEDRoot) SendToWLED(cmd *base.OperatorIO, dst *image.RGBA) *base.OperatorIO
type WLEDSegment ¶
Click to show internal directories.
Click to hide internal directories.