Add Breathe struct constructor

This commit is contained in:
Ryan Cavicchioni 2021-03-20 21:24:44 -05:00
parent 52f610489f
commit 1dcfb8a624
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -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) {
var (
err error