You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
729 B
32 lines
729 B
package effects
|
|
|
|
import (
|
|
"fmt"
|
|
"git.aiterp.net/lucifer3/server/device"
|
|
"git.aiterp.net/lucifer3/server/internal/color"
|
|
"time"
|
|
)
|
|
|
|
type Manual struct {
|
|
Power *bool `json:"power,omitempty"`
|
|
Color *color.Color `json:"color,omitempty"`
|
|
Intensity *float64 `json:"intensity,omitempty"`
|
|
Temperature *float64 `json:"temperature,omitempty"`
|
|
}
|
|
|
|
func (e Manual) EffectDescription() string {
|
|
return fmt.Sprintf("Manual%s", e.State(0, 0, 0, 0).String())
|
|
}
|
|
|
|
func (e Manual) Frequency() time.Duration {
|
|
return 0
|
|
}
|
|
|
|
func (e Manual) State(int, int, int, int) device.State {
|
|
return device.State{
|
|
Power: e.Power,
|
|
Temperature: e.Temperature,
|
|
Intensity: e.Intensity,
|
|
Color: e.Color,
|
|
}
|
|
}
|