Browse Source

Splitted Animation

Max Nuding 12 years ago
parent
commit
0ffe28bfab
1 changed files with 30 additions and 2 deletions
  1. 30
    2
      CubeFirmware/animations.c

+ 30
- 2
CubeFirmware/animations.c View File

46
 void simpleAnimationE(void);
46
 void simpleAnimationE(void);
47
 void simpleAnimationF(void);
47
 void simpleAnimationF(void);
48
 void simpleAnimationG(void);
48
 void simpleAnimationG(void);
49
+void simpleAnimationH(void);
50
+void simpleAnimationI(void);
51
+void simpleAnimationJ(void);
52
+
49
 
53
 
50
 // Array of animation functions
54
 // Array of animation functions
51
-#define NUMOFANIMATIONS 7
55
+#define NUMOFANIMATIONS 10
52
 void (*animations[NUMOFANIMATIONS])(void) = { &simpleAnimationA, &simpleAnimationB,
56
 void (*animations[NUMOFANIMATIONS])(void) = { &simpleAnimationA, &simpleAnimationB,
53
 								&simpleAnimationC, &simpleAnimationD, &simpleAnimationE,
57
 								&simpleAnimationC, &simpleAnimationD, &simpleAnimationE,
54
-								&simpleAnimationF, &simpleAnimationG };
58
+								&simpleAnimationF, &simpleAnimationG, &simpleAnimationH, &simpleAnimationI, &simpleAnimationJ };
55
 
59
 
56
 #define WAVELENGTH 2
60
 #define WAVELENGTH 2
57
 
61
 
206
 	}
210
 	}
207
 	buffClearAllPixels(buff);
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
 	//Cube_2
222
 	//Cube_2
210
 	for(x = 2; x < 6; x++) {
223
 	for(x = 2; x < 6; x++) {
211
 		for(y = 2; y < 6; y++) {
224
 		for(y = 2; y < 6; y++) {
230
 		wdt_reset();	
243
 		wdt_reset();	
231
 	}
244
 	}
232
 	buffClearAllPixels(buff);
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
 	//Cube_3
254
 	//Cube_3
235
 	for(x = 1; x < 7; x++){
255
 	for(x = 1; x < 7; x++){
256
 	}
276
 	}
257
 	buffClearAllPixels(buff);
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
 	//Cube_4
287
 	//Cube_4
260
 	for(x = 0; x < 8; x++){
288
 	for(x = 0; x < 8; x++){
261
 		for(y = 0; y < 8; y++) {
289
 		for(y = 0; y < 8; y++) {

Loading…
Cancel
Save