il y a clairement une probleme hardware
This commit is contained in:
parent
6e9c5e49d1
commit
0ccf834e84
4
build.sh
4
build.sh
@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
function build
|
function build
|
||||||
{
|
{
|
||||||
echo === $1 ===
|
echo ============= $1 ==============
|
||||||
cd $1
|
cd $1
|
||||||
make t
|
make t
|
||||||
error=$?
|
error=$?
|
||||||
cd ..
|
cd ..
|
||||||
echo error ${error}
|
echo === error on $1 = ${error}
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
@ -211,7 +211,7 @@ int getline_to(int fd, char *where, int szm, int to_ms)
|
|||||||
{
|
{
|
||||||
int curpos, byte, retval;
|
int curpos, byte, retval;
|
||||||
|
|
||||||
#if DEBUG_LEVEL
|
#if DEBUG_LEVEL > 1
|
||||||
fprintf(stderr, ">>> %s ( %d %p %d %d )\n", __func__,
|
fprintf(stderr, ">>> %s ( %d %p %d %d )\n", __func__,
|
||||||
fd, where, szm, to_ms);
|
fd, where, szm, to_ms);
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,14 +33,13 @@ void setup() {
|
|||||||
pinMode(RELAIS_FRIGO, OUTPUT);
|
pinMode(RELAIS_FRIGO, OUTPUT);
|
||||||
pinMode(RELAIS_VENTILO, OUTPUT);
|
pinMode(RELAIS_VENTILO, OUTPUT);
|
||||||
|
|
||||||
Serial.print("\n");
|
Serial.print("M booting\n");
|
||||||
/* XXX */
|
/* XXX */
|
||||||
/* changing the voltage reference of the ADC
|
/* changing the voltage reference of the ADC
|
||||||
* greatly increase the prcision on the limited
|
* greatly increase the prcision on the limited
|
||||||
* range of our temperatures.
|
* range of our temperatures.
|
||||||
*/
|
*/
|
||||||
analogReference(INTERNAL1V1); // Pour Arduino Mega2560
|
analogReference(INTERNAL1V1); // Pour Arduino Mega2560
|
||||||
Serial.print("\n");
|
|
||||||
read_config(0, ¶metres);
|
read_config(0, ¶metres);
|
||||||
// display_config(¶metres);
|
// display_config(¶metres);
|
||||||
Serial.print("M running now\n");
|
Serial.print("M running now\n");
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -83,6 +84,11 @@ do {
|
|||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( -1 == received) { /* anti ddos */
|
||||||
|
sleep(1);
|
||||||
|
waddstr(glass, " lost connection ?\n");
|
||||||
|
}
|
||||||
|
|
||||||
if ('\r' != received) waddch(glass, received);
|
if ('\r' != received) waddch(glass, received);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,9 +102,9 @@ do {
|
|||||||
sprintf(ligne, " got $%X '%c'\n", received,
|
sprintf(ligne, " got $%X '%c'\n", received,
|
||||||
isprint(received) ? received : '?');
|
isprint(received) ? received : '?');
|
||||||
waddstr(glass, ligne); wrefresh(glass);
|
waddstr(glass, ligne); wrefresh(glass);
|
||||||
|
sleep(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (0==received) sleep(1); /* anti ddos */
|
|
||||||
|
|
||||||
/* que doit-on faire avec ce qu'on
|
/* que doit-on faire avec ce qu'on
|
||||||
vient de recevoir ? */
|
vient de recevoir ? */
|
||||||
|
Loading…
Reference in New Issue
Block a user