Compare commits
3 Commits
ee5f22419a
...
43a71bf468
Author | SHA1 | Date | |
---|---|---|---|
|
43a71bf468 | ||
|
67aa367e1e | ||
|
4a033432bf |
8
essai.c
8
essai.c
@ -126,7 +126,7 @@ fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------- */
|
||||
static void finish(int signal)
|
||||
static void finish(void)
|
||||
{
|
||||
endwin();
|
||||
fprintf(stderr, "end of pid %d\n", getpid());
|
||||
@ -180,16 +180,18 @@ sleep(1);
|
||||
initscr();
|
||||
nonl(); cbreak(); noecho();
|
||||
keypad(stdscr, TRUE); /* acces aux touches 'curseur' */
|
||||
atexit(finish);
|
||||
|
||||
sprintf(ligne, " Demonstrator pid:%d %s ", getpid(), device);
|
||||
fond_ecran(ligne);
|
||||
|
||||
|
||||
traite_les_messages(serial_in, nbreloops, K);
|
||||
|
||||
/*
|
||||
* plop, on a fini, il faut restaurer la console
|
||||
*/
|
||||
finish(0);
|
||||
|
||||
finish();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
4
plot.sh
4
plot.sh
@ -15,7 +15,7 @@ TMPFILE="/dev/shm/tmpdata"
|
||||
echo $nbsamp
|
||||
wc -l ${DATAFILE}
|
||||
|
||||
tail -3000 < ${DATAFILE} > ${TMPFILE}
|
||||
tail -${nbsamp} < ${DATAFILE} > ${TMPFILE}
|
||||
|
||||
gnuplot << __EOC__
|
||||
set term png size 1600,800
|
||||
@ -27,7 +27,7 @@ set title "* Temperatures du Phytotron *"
|
||||
set xdata time
|
||||
set timefmt "%s"
|
||||
set format x "%b %d\n%H:%M"
|
||||
set yrange [ 0.0 : 30.0 ]
|
||||
set yrange [ 0.0 : 40.0 ]
|
||||
plot "${TMPFILE}" using 1:3 title " inside" with lines, \
|
||||
"${TMPFILE}" using 1:4 title "ambient" with lines
|
||||
__EOC__
|
||||
|
@ -133,6 +133,8 @@ if (1 != foo)
|
||||
{
|
||||
fprintf(stderr, "%s : byte %d rd %d errno %d\n",
|
||||
__func__, byte, foo, errno);
|
||||
/* XXX */
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
return (int)byte;
|
||||
|
16
serial/t.c
16
serial/t.c
@ -3,6 +3,22 @@
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/**********************************************************************
|
||||
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 <stdlib.h>
|
||||
#include <strings.h>
|
||||
|
@ -4,6 +4,22 @@
|
||||
* 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 <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -1,3 +1,18 @@
|
||||
/**********************************************************************
|
||||
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 <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,9 +1,25 @@
|
||||
/*
|
||||
* DD2 Monitoring
|
||||
*
|
||||
* ncurses seven segment display
|
||||
* ncurses linear vumeter 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 <stdlib.h>
|
||||
#include <strings.h>
|
||||
|
Loading…
Reference in New Issue
Block a user