more tinkering.

This commit is contained in:
2022-08-14 13:57:56 +02:00
parent e752b1bafd
commit 15a4f3289f
16 changed files with 331 additions and 237 deletions
+32
View File
@@ -0,0 +1,32 @@
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).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,
}
}