示例#1
0
func init() {
	deviceapi.DefaultRegistry.Register(&deviceapi.Registration{
		Info: deviceapi.Info{
			Name:        "Sunrise",
			Description: "A sunrise deviceapi for color lamps"},
		ConfigFactory: deviceapi.DelayConfigFactory,
		EffectFactory: deviceapi.ColorLampEffectFactory(SunriseEffectFactory)})
}
示例#2
0
func init() {
	deviceapi.DefaultRegistry.Register(&deviceapi.Registration{
		Info: deviceapi.Info{
			Name:        "Colorfade",
			Description: "Fades with Color"},
		ConfigFactory: func() deviceapi.Config { return &ColorfadeConfig{"#ffffff", "15ms"} },
		EffectFactory: deviceapi.ColorLampEffectFactory(ColorFadeEffect)})
}
示例#3
0
func init() {
	deviceapi.DefaultRegistry.Register(&deviceapi.Registration{
		Info: deviceapi.Info{
			Name:        "Color",
			Description: "Set a static color for your color lamp"},
		ConfigFactory: func() deviceapi.Config {
			return &ColorConfig{"#ffffff"}
		},
		EffectFactory: deviceapi.ColorLampEffectFactory(ColorEffectFactory)})
}