commit du dimanche

This commit is contained in:
phyto 2019-04-14 11:33:52 +02:00
parent 6bbeb33d25
commit a95e2846d4
4 changed files with 10 additions and 7 deletions

3
.gitignore vendored
View File

@ -25,3 +25,6 @@ viz/curses/t
viz/gnuplot/*.png viz/gnuplot/*.png
viz/*.a viz/*.a
audio/t
audio/*.wav

View File

@ -61,7 +61,7 @@ for (idx=0; idx<nbloops; idx++) {
/* here we are trying to log all that temps values */ /* here we are trying to log all that temps values */
if (NULL!=fp) { if (NULL!=fp) {
temps = time(NULL); temps = time(NULL);
if ((temps-old_temps) > 60) { if ((temps-old_temps) > 50) {
fprintf(fp, "%ld %f %f %f %f\n", temps, fprintf(fp, "%ld %f %f %f %f\n", temps,
Fdatas[0], Fdatas[1], Fdatas[2], Fdatas[3]); Fdatas[0], Fdatas[1], Fdatas[2], Fdatas[3]);
fflush(fp); fflush(fp);
@ -121,7 +121,7 @@ nonl(); cbreak(); noecho();
keypad(stdscr, TRUE); /* acces aux touches 'curseur' */ keypad(stdscr, TRUE); /* acces aux touches 'curseur' */
fond_ecran(" Demonstrator "); fond_ecran(" Demonstrator ");
affiche_valeurs(serial_in, 10000); affiche_valeurs(serial_in, 5000000);
/* /*
* plop, on a fini, il faut restaurer la console * plop, on a fini, il faut restaurer la console

View File

@ -5,12 +5,12 @@
DATAFILE="serial/foo.dat" DATAFILE="serial/foo.dat"
IMAGE="graphe.png" IMAGE="graphe.png"
TMPFILE="/tmp/tmpdata" TMPFILE="/dev/shm/tmpdata"
tail -20000 < ${DATAFILE} > ${TMPFILE} tail -10000 < ${DATAFILE} > ${TMPFILE}
gnuplot << __EOC__ gnuplot << __EOC__
set term png size 2400,700 set term png size 1650,700
set output "${IMAGE}" set output "${IMAGE}"
set ytics 2 set ytics 2
set xtics set xtics

View File

@ -19,9 +19,9 @@ void setup() {
* range of our temperatures. * range of our temperatures.
*/ */
analogReference(INTERNAL1V1); // Pour Arduino Mega2560 analogReference(INTERNAL1V1); // Pour Arduino Mega2560
Serial.print("\n\n\n\n"); Serial.print("\n\n");
delay(1000); delay(1000);
Serial.print("M running\n"); Serial.print("M running now\n");
} }
/* -------------------------------------------------- */ /* -------------------------------------------------- */