fix the 7 segments demo

This commit is contained in:
phyto 2019-01-26 16:32:10 +01:00
parent cb0a2b5732
commit 790e06c4cc

View File

@ -19,20 +19,20 @@ char ligne[100];
for (idx=0; idx<10; idx++) { for (idx=0; idx<10; idx++) {
c = '0'+idx; c = '0'+idx;
p = 1+(idx*8); p = 1+(idx*9);
aff7segs_digit(stdscr, 17, p, c); aff7segs_digit(stdscr, 17, p, c);
mvaddch(16, p, c); mvaddch(16, p, c);
} }
for (loop=0; loop<nbl; loop++) { for (loop=0; loop<nbl; loop++) {
sprintf(ligne, "%4d", loop); sprintf(ligne, "%5d", loop);
for (idx=0; idx<strlen(ligne); idx++) { for (idx=0; idx<strlen(ligne); idx++) {
aff7segs_digit(stdscr, 5, 1+(idx*8), ligne[idx]); aff7segs_digit(stdscr, 5, 1+(idx*9), ligne[idx]);
} }
mvaddstr(3, 2, ligne); mvaddstr(3, 2, ligne);
refresh(); refresh();
usleep(300*1000); usleep(200*1000);
} }
@ -145,7 +145,7 @@ fond_ecran(" Demonstrator ");
switch (demonum) { switch (demonum) {
case 0: demo_vumetres(666, 0); break; case 0: demo_vumetres(666, 0); break;
case 1: demo_waterfall(666, 0); break; case 1: demo_waterfall(666, 0); break;
case 2: demo_7segments(450, 0); break; case 2: demo_7segments(4567, 0); break;
} }
/* /*