Add Breathe struct constructor
This commit is contained in:
parent
52f610489f
commit
1dcfb8a624
18
lights.go
18
lights.go
@ -98,6 +98,24 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
DefaultBreatheCycles float64 = 1
|
||||||
|
DefaultBreathePeriod float64 = 1
|
||||||
|
DefaultBreathePersist bool = false
|
||||||
|
DefaultBreathePowerOn bool = true
|
||||||
|
DefaultBreathePeak float64 = 0.5
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewBreathe() Breathe {
|
||||||
|
var b Breathe
|
||||||
|
b.Period = DefaultBreathePeriod
|
||||||
|
b.Cycles = DefaultBreatheCycles
|
||||||
|
b.Persist = DefaultBreathePersist
|
||||||
|
b.PowerOn = DefaultBreathePowerOn
|
||||||
|
b.Peak = DefaultBreathePeak
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Client) SetState(selector string, state State) (*LifxResponse, error) {
|
func (c *Client) SetState(selector string, state State) (*LifxResponse, error) {
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
|
Loading…
Reference in New Issue
Block a user