示例#1
0
func init() {
	deviceapi.DefaultRegistry.Register(&deviceapi.Registration{
		Info: deviceapi.Info{
			Name:        "Rainbow",
			Description: "A rainbow deviceapi for color lamps"},
		ConfigFactory: deviceapi.DelayConfigFactory,
		EffectFactory: deviceapi.StripeLampEffectFactory(RainbowEffectFactory)})
}
示例#2
0
func init() {
	deviceapi.DefaultRegistry.Register(&deviceapi.Registration{
		Info: deviceapi.Info{
			Name:        "Random Brightness",
			Description: "Sets random pixels to random brightness"},
		ConfigFactory: deviceapi.DelayConfigFactory,
		EffectFactory: deviceapi.StripeLampEffectFactory(NewRandomBrightnessEffect)})

	deviceapi.DefaultRegistry.Register(&deviceapi.Registration{
		Info: deviceapi.Info{
			Name:        "Random Fade",
			Description: "Fades randomly selected pixels"},
		ConfigFactory: deviceapi.DelayConfigFactory,
		EffectFactory: deviceapi.StripeLampEffectFactory(NewRandomFadeEffect)})

	deviceapi.DefaultRegistry.Register(&deviceapi.Registration{
		Info: deviceapi.Info{
			Name:        "Random Color",
			Description: "Sets random pixels to random colors"},
		ConfigFactory: deviceapi.DelayConfigFactory,
		EffectFactory: deviceapi.StripeLampEffectFactory(NewRandomColorEffect)})

}