-
Notifications
You must be signed in to change notification settings - Fork 24
/
PlusPrograms.cpp
29 lines (24 loc) · 899 Bytes
/
PlusPrograms.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
G35: An Arduino library for GE Color Effects G-35 holiday lights.
Copyright © 2011 The G35 Authors. Use, modification, and distribution are
subject to the BSD license as described in the accompanying LICENSE file.
By Mike Tsao <http://github.com/sowbug>.
See README for complete attributions.
*/
#include <PlusPrograms.h>
LightProgram* PlusProgramGroup::CreateProgram(G35& lights,
uint8_t program_index) {
switch (program_index % ProgramCount) {
case 0: return new Meteorite(lights);
case 1: return new Twinkle(lights);
case 2: return new RedGreenChase(lights);
case 3: return new Pulse(lights);
case 4: return new Orbit(lights);
case 5: return new OrbitSmudge(lights);
case 6: return new Cylon(lights);
case 7: return new Stereo(lights);
case 8: return new Inchworm(lights);
}
// not reached
return NULL;
}