|
@@ -46,12 +46,16 @@ void simpleAnimationD(void);
|
46
|
46
|
void simpleAnimationE(void);
|
47
|
47
|
void simpleAnimationF(void);
|
48
|
48
|
void simpleAnimationG(void);
|
|
49
|
+void simpleAnimationH(void);
|
|
50
|
+void simpleAnimationI(void);
|
|
51
|
+void simpleAnimationJ(void);
|
|
52
|
+
|
49
|
53
|
|
50
|
54
|
// Array of animation functions
|
51
|
|
-#define NUMOFANIMATIONS 7
|
|
55
|
+#define NUMOFANIMATIONS 10
|
52
|
56
|
void (*animations[NUMOFANIMATIONS])(void) = { &simpleAnimationA, &simpleAnimationB,
|
53
|
57
|
&simpleAnimationC, &simpleAnimationD, &simpleAnimationE,
|
54
|
|
- &simpleAnimationF, &simpleAnimationG };
|
|
58
|
+ &simpleAnimationF, &simpleAnimationG, &simpleAnimationH, &simpleAnimationI, &simpleAnimationJ };
|
55
|
59
|
|
56
|
60
|
#define WAVELENGTH 2
|
57
|
61
|
|
|
@@ -206,6 +210,15 @@ void simpleAnimationG(void) {
|
206
|
210
|
}
|
207
|
211
|
buffClearAllPixels(buff);
|
208
|
212
|
|
|
213
|
+ free(buff);
|
|
214
|
+}
|
|
215
|
+
|
|
216
|
+void simpleAnimationH (void){
|
|
217
|
+ uint8_t *buff;
|
|
218
|
+ int8_t x, y, z;
|
|
219
|
+
|
|
220
|
+ buff = buffNew();
|
|
221
|
+
|
209
|
222
|
//Cube_2
|
210
|
223
|
for(x = 2; x < 6; x++) {
|
211
|
224
|
for(y = 2; y < 6; y++) {
|
|
@@ -230,6 +243,13 @@ void simpleAnimationG(void) {
|
230
|
243
|
wdt_reset();
|
231
|
244
|
}
|
232
|
245
|
buffClearAllPixels(buff);
|
|
246
|
+ free(buff);
|
|
247
|
+}
|
|
248
|
+void simpleAnimationI (void) {
|
|
249
|
+ uint8_t *buff;
|
|
250
|
+ int8_t x, y, z;
|
|
251
|
+
|
|
252
|
+ buff = buffNew();
|
233
|
253
|
|
234
|
254
|
//Cube_3
|
235
|
255
|
for(x = 1; x < 7; x++){
|
|
@@ -256,6 +276,14 @@ void simpleAnimationG(void) {
|
256
|
276
|
}
|
257
|
277
|
buffClearAllPixels(buff);
|
258
|
278
|
|
|
279
|
+ free(buff);
|
|
280
|
+}
|
|
281
|
+void simpleAnimationJ (void) {
|
|
282
|
+ uint8_t *buff;
|
|
283
|
+ int8_t x, y, z;
|
|
284
|
+
|
|
285
|
+ buff = buffNew();
|
|
286
|
+
|
259
|
287
|
//Cube_4
|
260
|
288
|
for(x = 0; x < 8; x++){
|
261
|
289
|
for(y = 0; y < 8; y++) {
|