il y a clairement une probleme hardware

This commit is contained in:
phyto 2019-05-21 16:29:39 +02:00
parent 6e9c5e49d1
commit 0ccf834e84
4 changed files with 11 additions and 6 deletions

View File

@ -5,12 +5,12 @@
function build
{
echo === $1 ===
echo ============= $1 ==============
cd $1
make t
error=$?
cd ..
echo error ${error}
echo === error on $1 = ${error}
}
# ------------------------------------------------------------------

View File

@ -211,7 +211,7 @@ int getline_to(int fd, char *where, int szm, int to_ms)
{
int curpos, byte, retval;
#if DEBUG_LEVEL
#if DEBUG_LEVEL > 1
fprintf(stderr, ">>> %s ( %d %p %d %d )\n", __func__,
fd, where, szm, to_ms);
#endif

View File

@ -33,14 +33,13 @@ void setup() {
pinMode(RELAIS_FRIGO, OUTPUT);
pinMode(RELAIS_VENTILO, OUTPUT);
Serial.print("\n");
Serial.print("M booting\n");
/* XXX */
/* changing the voltage reference of the ADC
* greatly increase the prcision on the limited
* range of our temperatures.
*/
analogReference(INTERNAL1V1); // Pour Arduino Mega2560
Serial.print("\n");
read_config(0, &parametres);
// display_config(&parametres);
Serial.print("M running now\n");

View File

@ -4,6 +4,7 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
@ -83,6 +84,11 @@ do {
fflush(stderr);
}
if ( -1 == received) { /* anti ddos */
sleep(1);
waddstr(glass, " lost connection ?\n");
}
if ('\r' != received) waddch(glass, received);
}
@ -96,9 +102,9 @@ do {
sprintf(ligne, " got $%X '%c'\n", received,
isprint(received) ? received : '?');
waddstr(glass, ligne); wrefresh(glass);
sleep(1);
#endif
if (0==received) sleep(1); /* anti ddos */
/* que doit-on faire avec ce qu'on
vient de recevoir ? */