Compare commits

..

No commits in common. "43a71bf4680f3b800c803ef6bc1bdccb8e4b72ec" and "ee5f22419ab3640ba7b847b957cfbb924901ff6c" have entirely different histories.

7 changed files with 6 additions and 73 deletions

View File

@ -126,7 +126,7 @@ fclose(fp);
return 0; return 0;
} }
/* --------------------------------------------------------------- */ /* --------------------------------------------------------------- */
static void finish(void) static void finish(int signal)
{ {
endwin(); endwin();
fprintf(stderr, "end of pid %d\n", getpid()); fprintf(stderr, "end of pid %d\n", getpid());
@ -180,18 +180,16 @@ sleep(1);
initscr(); initscr();
nonl(); cbreak(); noecho(); nonl(); cbreak(); noecho();
keypad(stdscr, TRUE); /* acces aux touches 'curseur' */ keypad(stdscr, TRUE); /* acces aux touches 'curseur' */
atexit(finish);
sprintf(ligne, " Demonstrator pid:%d %s ", getpid(), device); sprintf(ligne, " Demonstrator pid:%d %s ", getpid(), device);
fond_ecran(ligne); fond_ecran(ligne);
traite_les_messages(serial_in, nbreloops, K); traite_les_messages(serial_in, nbreloops, K);
/* /*
* plop, on a fini, il faut restaurer la console * plop, on a fini, il faut restaurer la console
*/ */
finish(); finish(0);
return 0; return 0;
} }

View File

@ -15,7 +15,7 @@ TMPFILE="/dev/shm/tmpdata"
echo $nbsamp echo $nbsamp
wc -l ${DATAFILE} wc -l ${DATAFILE}
tail -${nbsamp} < ${DATAFILE} > ${TMPFILE} tail -3000 < ${DATAFILE} > ${TMPFILE}
gnuplot << __EOC__ gnuplot << __EOC__
set term png size 1600,800 set term png size 1600,800
@ -27,7 +27,7 @@ set title "* Temperatures du Phytotron *"
set xdata time set xdata time
set timefmt "%s" set timefmt "%s"
set format x "%b %d\n%H:%M" set format x "%b %d\n%H:%M"
set yrange [ 0.0 : 40.0 ] set yrange [ 0.0 : 30.0 ]
plot "${TMPFILE}" using 1:3 title " inside" with lines, \ plot "${TMPFILE}" using 1:3 title " inside" with lines, \
"${TMPFILE}" using 1:4 title "ambient" with lines "${TMPFILE}" using 1:4 title "ambient" with lines
__EOC__ __EOC__

View File

@ -133,8 +133,6 @@ if (1 != foo)
{ {
fprintf(stderr, "%s : byte %d rd %d errno %d\n", fprintf(stderr, "%s : byte %d rd %d errno %d\n",
__func__, byte, foo, errno); __func__, byte, foo, errno);
/* XXX */
exit(1);
return -1; return -1;
} }
return (int)byte; return (int)byte;

View File

@ -3,22 +3,6 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
/**********************************************************************
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
**********************************************************************/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <strings.h> #include <strings.h>

View File

@ -4,22 +4,6 @@
* ncurses seven segment display * ncurses seven segment display
*/ */
/**********************************************************************
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
**********************************************************************/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -1,18 +1,3 @@
/**********************************************************************
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
**********************************************************************/
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,25 +1,9 @@
/* /*
* DD2 Monitoring * DD2 Monitoring
* *
* ncurses linear vumeter display * ncurses seven segment display
*/ */
/**********************************************************************
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
**********************************************************************/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <strings.h> #include <strings.h>