Created
October 3, 2017 09:37
-
-
Save brianewing/bc80833f1d87fd85df60b1631bf75802 to your computer and use it in GitHub Desktop.
redshift server types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Animator struct { | |
Strip *strip.LEDStrip | |
Effects []effects.Effect | |
Running bool | |
} | |
func (a *Animator) Run(interval time.Duration) {} | |
func (a *Animator) Render() { | |
for _, effect := range a.Effects { | |
effect.Render(a.Strip) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Effect interface { | |
Render(strip *strip.LEDStrip) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type LEDStrip struct { | |
Size int | |
Buffer [][]uint8 | |
sync.Mutex | |
} | |
func New(size int) *LEDStrip {} | |
func NewBuffer(size int) [][]uint8 {} | |
func clearBuffer(buffer [][]uint8) {} | |
func (s *LEDStrip) Clear() {} | |
func (s *LEDStrip) SetPixel(i int, color []uint8) {} | |
func (s *LEDStrip) Randomize() {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment