more debug
This commit is contained in:
21
essai.c
21
essai.c
@@ -20,27 +20,32 @@ int verbosity;
|
||||
int affiche_valeurs(int sfd, int nbloops)
|
||||
{
|
||||
int idx, foo;
|
||||
char ligne[200], buff[200];
|
||||
float datas[4];
|
||||
char ligne[200];
|
||||
int Idatas[4];
|
||||
float Fdatas[4];
|
||||
|
||||
for (idx=0; idx<nbloops; idx++) {
|
||||
|
||||
foo = getline_to(sfd, ligne, 100, 0);
|
||||
if (verbosity) message(ligne);
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
if (foo) fprintf(stderr, "get values -> %d\n", foo);
|
||||
#endif
|
||||
|
||||
foo = parse4values(ligne, 'T', datas);
|
||||
foo = parse4_Ivalues(ligne, 'T', Idatas);
|
||||
#if DEBUG_LEVEL
|
||||
if (foo) fprintf(stderr, "parse -> %d\n", foo);
|
||||
if (foo) fprintf(stderr, "parse I val -> %d\n", foo);
|
||||
#endif
|
||||
|
||||
values2temperature(datas);
|
||||
values2temperature(Idatas, Fdatas);
|
||||
|
||||
foo = aff7segs_float(stdscr, 3, 5, datas[0]);
|
||||
foo = aff7segs_float(stdscr, 14, 5, datas[1]);
|
||||
foo = aff7segs_float(stdscr, 25, 5, datas[2]);
|
||||
for (foo=0; foo<3; foo++) {
|
||||
sprintf(ligne, "%4d", Idatas[foo]);
|
||||
minidigit_affstr(stdscr, 3+(12*foo), 4, ligne);
|
||||
|
||||
aff7segs_float(stdscr, 3+(12*foo), 55, Fdatas[foo]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user