more debug

This commit is contained in:
phyto
2019-04-03 16:25:38 +02:00
parent b47e467d21
commit 9379253d16
8 changed files with 68 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ int aff7segs_short(WINDOW * win, int lig, int col, short value);
int aff7segs_float(WINDOW * win, int lig, int col, float value);
int minidigit_0(WINDOW *win, int lig, int col, char digit, int k);
int minidigit_affstr(WINDOW *win, int lig, int col, char *str);
int minidigit_HMS(WINDOW *win, int lig, int col, int k);

View File

@@ -78,14 +78,26 @@ switch (digit) {
for (l=0; l<5; l++) {
for (c=0; c<3; c++) {
makedot(win, l+lig, (c*2)+col, *cptr++);
}
}
wrefresh(win);
return 0;
}
/* ---------------------------------------------------------------- */
int minidigit_affstr(WINDOW *win, int lig, int col, char *str)
{
int foo, len;
len = strlen(str);
for (foo=0; foo<len; foo++) {
minidigit_0(win, lig, col, str[foo], 0);
col += 8;
}
return 0;
}
/* ---------------------------------------------------------------- */

View File

@@ -24,15 +24,20 @@ for (loop=0; loop<nbl; loop++) {
sprintf(chaine, ".%08d.", rand()%1000000);
/***
for (foo=0; foo<10; foo++) {
minidigit_0(stdscr, 5, 2+foo*8, chaine[foo], 0);
}
***/
minidigit_affstr(stdscr, 5, 2, chaine);
wrefresh(stdscr);
usleep(350*1000);
/***
for (foo=0; foo<10; foo++) {
minidigit_0(stdscr, 5, 2+foo*8, ' ', 0);
}
***/
minidigit_HMS(stdscr, 15, 9, 0);
@@ -216,7 +221,7 @@ nonl(); cbreak(); noecho();
keypad(stdscr, TRUE); /* acces aux touches 'curseur' */
fond_ecran(" Demonstrator ");
fond_ecran(" Ncurses Eyecandy ");
switch (demonum) {
case 0: demo_vumetres(nb_loops, 0); break;