hardware bug found, sorry

This commit is contained in:
phyto 2019-05-15 17:22:44 +02:00
부모 7a3ba3b44c
커밋 946616e55a
4개의 변경된 파일22개의 추가작업 그리고 6개의 파일을 삭제

파일 보기

@ -125,6 +125,7 @@ int main(int argc, char *argv[])
int opt;
int serial_in;
char *device = "/dev/ttyACM0";
char ligne[100];
while ((opt = getopt(argc, argv, "d:hv")) != -1) {
switch (opt) {
@ -150,7 +151,8 @@ sleep(1);
initscr();
nonl(); cbreak(); noecho();
keypad(stdscr, TRUE); /* acces aux touches 'curseur' */
fond_ecran(" Demonstrator ");
sprintf(ligne, " Demonstrator %d %s ", getpid(), device);
fond_ecran(ligne);
traite_les_messages(serial_in, 50000000);

파일 보기

@ -7,10 +7,12 @@ DATAFILE="serial/foo.dat"
IMAGE="graphe.png"
TMPFILE="/dev/shm/tmpdata"
tail -10000 < ${DATAFILE} > ${TMPFILE}
wc -l ${DATAFILE}
tail -2500 < ${DATAFILE} > ${TMPFILE}
gnuplot << __EOC__
set term png size 1650,700
set term png size 1600,800
set output "${IMAGE}"
set ytics 2
set xtics
@ -24,6 +26,6 @@ plot "${TMPFILE}" using 1:3 title " inside" with lines, \
"${TMPFILE}" using 1:4 title "ambient" with lines
__EOC__
display ${IMAGE}
display ${IMAGE} &

파일 보기

@ -9,7 +9,6 @@
#define DEBUG 0
/* -------------------------------------------------- */
/* some interesting macros */
/* -------------------------------------------------- */
char waitkey(char echo)
@ -127,7 +126,18 @@ else {
prtln("M frigo OFF");
digitalWrite(RELAIS_FRIGO, LOW);
}
prtln("...");
}
/* --------------------------------------------------------------- */
void controle_ventilo(char on_off)
{
if (on_off) {
prtln("M ventilo ON");
digitalWrite(RELAIS_VENTILO, HIGH);
}
else {
prtln("M ventilo OFF");
digitalWrite(RELAIS_VENTILO, LOW);
}
}
/* --------------------------------------------------------------- */

파일 보기

@ -41,6 +41,8 @@ from->control++;
EEPROM.put(0, *from);
/* no check of good write here ? */
return -1;
}
/* --------------------------------------------------------------- */