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
681 B
32 lines
681 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"`
|
|
Color *color.Color `json:"color"`
|
|
Intensity *float64 `json:"intensity"`
|
|
Temperature *float64 `json:"temperature"`
|
|
}
|
|
|
|
func (e Manual) EffectDescription() string {
|
|
return fmt.Sprintf("Manual%s", e.State(0, 0, 0).String())
|
|
}
|
|
|
|
func (e Manual) Frequency() time.Duration {
|
|
return 0
|
|
}
|
|
|
|
func (e Manual) State(int, int, int) device.State {
|
|
return device.State{
|
|
Power: e.Power,
|
|
Temperature: e.Temperature,
|
|
Intensity: e.Intensity,
|
|
Color: e.Color,
|
|
}
|
|
}
|