small corrections and adjusted animation playlist and speeds

This commit is contained in:
Stefan H. 2018-12-29 20:54:15 +01:00
parent 541d833b9d
commit c7ab90a326
2 changed files with 20 additions and 17 deletions

View file

@ -155,7 +155,6 @@ void playWideFile(char* file, int framespeed) {
uint32_t rgb = strtol(rgbStr.c_str(), NULL, 16); uint32_t rgb = strtol(rgbStr.c_str(), NULL, 16);
anim[i*8+j] = new RgbColor(rgb & 0xFF, rgb>>8 & 0xFF, rgb>>16); anim[i*8+j] = new RgbColor(rgb & 0xFF, rgb>>8 & 0xFF, rgb>>16);
strip.SetPixelColor( i*8+j , *anim[i*8+j]); strip.SetPixelColor( i*8+j , *anim[i*8+j]);
strip.SetPixelColor( 64+i*8+j , *anim[i*8+j]);
} }
line = f.readStringUntil('\n'); line = f.readStringUntil('\n');
} }
@ -163,7 +162,7 @@ void playWideFile(char* file, int framespeed) {
delay(framespeed); delay(framespeed);
if(frame<frameNumber-1) line = f.readStringUntil('\n'); line = f.readStringUntil('\n'); if(frame<frameNumber-1) line = f.readStringUntil('\n'); line = f.readStringUntil('\n');
for(int i=0; i<64; i++) { for(int i=0; i<128; i++) {
delete anim[i]; delete anim[i];
} }
} }

View file

@ -93,6 +93,7 @@ void playMapAnimation(int animDelay, uint8_t anim[][32]) {
} }
void loop() { void loop() {
int aniSpeed=110;
Serial.println("Entering loop ..."); Serial.println("Entering loop ...");
// turn off the pixels // turn off the pixels
@ -100,21 +101,24 @@ void loop() {
strip.ClearTo(black); strip.ClearTo(black);
playFile("/Center.c",2000); playFile("/Center.c",2000);
playFile("/Blink_center.c", 100); playFile("/Blink_center.c", aniSpeed);
playFile("/Move_left.c", 100); playFile("/Move_left.c", aniSpeed);
playFile("/Blink_left.c", 100); playFile("/Blink_left.c", aniSpeed);
playFile("/Move_left_center.c", 100); playFile("/Move_left_center.c", aniSpeed);
playFile("/Blink_LSD_start.c", 100); playFile("/Center.c",2000);
playFile("/LSD.c", 100); playFile("/Blink_LSD_start.c", aniSpeed);
playFile("/LSD.c", 120); playFile("/LSD.c", aniSpeed);
playFile("/LSD.c", 100); playFile("/LSD.c", aniSpeed-40);
playFile("/Blink_LSD_end.c", 100); playFile("/LSD.c", aniSpeed-80); playFile("/LSD.c", aniSpeed-80);
playFile("/Blink_center.c", 100); playFile("/LSD.c", aniSpeed-40);
playFile("/Move_right.c", 100); playFile("/LSD.c", aniSpeed);
playFile("/Blink_right.c", 100); playFile("/Blink_LSD_end.c", aniSpeed);
playFile("/Move_right_center.c", 100); playFile("/Center.c",1000);
playLRFile("/Blink_center_getAngry.c", "/Blink_center_getAngry.c", 100); playFile("/Blink_center.c", aniSpeed);
playWideFile("/WideTest.c", 300); playFile("/Move_right.c", aniSpeed);
playFile("/Blink_right.c", aniSpeed);
playFile("/Move_right_center.c", aniSpeed);
playWideFile("/Blink_center_getAngry_wide2.c", aniSpeed);
/*Serial.println("Animation test ..."); /*Serial.println("Animation test ...");
playBwAnimation(50, eye_move_cr); delay(3000); playBwAnimation(50, eye_move_cr); delay(3000);