Compare commits
2 Commits
becc179184
...
e9a4d586b4
Author | SHA1 | Date | |
---|---|---|---|
e9a4d586b4 | |||
cc6645fb48 |
@ -22,16 +22,6 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
const (
|
||||
OK Status = "ok"
|
||||
TimedOut Status = "timed_out"
|
||||
Offline Status = "offline"
|
||||
)
|
||||
|
||||
func (s Status) Success() bool {
|
||||
return s == OK
|
||||
}
|
||||
|
||||
func NewRGBColor(r, g, b uint8) (*RGBColor, error) {
|
||||
return &RGBColor{R: r, G: g, B: b}, nil
|
||||
}
|
10
lights.go
10
lights.go
@ -7,6 +7,12 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const (
|
||||
OK Status = "ok"
|
||||
TimedOut Status = "timed_out"
|
||||
Offline Status = "offline"
|
||||
)
|
||||
|
||||
type (
|
||||
Status string
|
||||
|
||||
@ -34,6 +40,10 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func (s Status) Success() bool {
|
||||
return s == OK
|
||||
}
|
||||
|
||||
func (c *Client) SetState(selector string, state State) ([]Result, error) {
|
||||
j, err := json.Marshal(state)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user