diff --git a/build.sh b/build.sh index 5f8b7bb..58f89e8 100755 --- a/build.sh +++ b/build.sh @@ -6,18 +6,31 @@ function build { echo ============= $1 ============== +curdir=${PWD} cd $1 make t error=$? -cd .. -echo === error on $1 = ${error} +cd ${curdir} + +if [ ${error} -ne 0 ] +then + echo === error on $1 = ${error} + exit +fi } # ------------------------------------------------------------------ +# +# euh, il faut parfois tweaker l'ordre de ces modules +# +modules=" core serial viz/curses ui audio storage " -build serial +for mod in ${modules} +do + build $mod +done -build ui +echo +++++++++++++++++++++++++++++++++++ make essai diff --git a/core/utils.c b/core/utils.c index 2538781..e5b3340 100644 --- a/core/utils.c +++ b/core/utils.c @@ -34,7 +34,7 @@ if (idx==16) { fprintf(fp, "%02x ", buffer[foo]); if (7==foo) fprintf(fp, " "); } - fprintf(fp, " - |"); + fprintf(fp, " |"); for (foo=0; foo<16; foo++) { c = buffer[foo]; fprintf(fp, "%c", isprint(c) ? c : ' '); diff --git a/serial/serial.c b/serial/serial.c index 0576605..22d2983 100644 --- a/serial/serial.c +++ b/serial/serial.c @@ -6,7 +6,7 @@ #include #include //Used for UART #include //Used for UART -#include //Used for UART +#include //Used for UART #include "serial.h" @@ -88,7 +88,7 @@ if (uart0 < 0) baudbits = baudrate2const(baudrate); -#if DEBUG_LEVEL > 1 +#if DEBUG_LEVEL fprintf(stderr, "%d -> 0x%04x\n", baudrate, baudbits); #endif @@ -107,7 +107,7 @@ options.c_cc[VMIN] = 1; /* ask for blocking read */ tcflush(uart0, TCIOFLUSH); tcsetattr(uart0, TCSANOW, &options); -tcflush(uart0, TCIFLUSH); /* do it again, sam */ +tcflush(uart0, TCIOFLUSH); /* do it again, sam */ if (verbosity) { fprintf(stderr, "%s %s uart0 = %d\n", diff --git a/simulator/rdtemp/rdtemp.ino b/simulator/rdtemp/rdtemp.ino index 05f0b24..e534604 100644 --- a/simulator/rdtemp/rdtemp.ino +++ b/simulator/rdtemp/rdtemp.ino @@ -136,7 +136,7 @@ void loop() { break; } } - delay(DELAI); + delay(parametres.delai); /* ETERNAL LOOP END HERE */ } diff --git a/storage/Makefile b/storage/Makefile index e69de29..52142f6 100644 --- a/storage/Makefile +++ b/storage/Makefile @@ -0,0 +1,4 @@ + + +t: t.c Makefile + gcc -Wall $< -o $@ diff --git a/storage/t.c b/storage/t.c index e69de29..8a4d9c0 100644 --- a/storage/t.c +++ b/storage/t.c @@ -0,0 +1,7 @@ +#include + +int main(int argc, char *argv[]) +{ +fprintf(stderr, "storage tool\n"); +return 0; +} diff --git a/ui/terminal.c b/ui/terminal.c index 5cadaf6..d126cec 100644 --- a/ui/terminal.c +++ b/ui/terminal.c @@ -21,16 +21,6 @@ extern int verbosity; int special_dumper(FILE *fp, unsigned char octet); -/* ---------------------------------------------------------------- */ -static void bordure(WINDOW * w, char *texte, int type) -{ -if (type) - box(w, 0, 0); -else - wborder(w, '|', '|', '-', '-', '+', '+', '+', '+'); -wstandout(w); mvwaddstr(w, 0, 3, texte); wstandend(w); -wrefresh(w); -} /* ---------------------------------------------------------------- */ static int interactive(WINDOW *glass, int fd_local, int fd_remote) { @@ -98,7 +88,7 @@ do { received = wgetch(glass); echo(); -#if DEBUG_LEVEL +#if DEBUG_LEVEL > 1 sprintf(ligne, " got $%X '%c'\n", received, isprint(received) ? received : '?'); waddstr(glass, ligne); wrefresh(glass); diff --git a/viz/curses/ecran.c b/viz/curses/ecran.c index f146668..516de6d 100644 --- a/viz/curses/ecran.c +++ b/viz/curses/ecran.c @@ -11,6 +11,16 @@ extern int verbosity; +/* ---------------------------------------------------------------- */ +void bordure(WINDOW * w, char *texte, int type) +{ +if (type) + box(w, 0, 0); +else + wborder(w, '|', '|', '-', '-', '+', '+', '+', '+'); +wstandout(w); mvwaddstr(w, 0, 3, texte); wstandend(w); +wrefresh(w); +} /* ---------------------------------------------------------------- */ int kbhit(void) { @@ -29,7 +39,7 @@ else { // input ungetch(ch); } -// restore block and echo + // restore block and echo echo(); nodelay(stdscr, FALSE); diff --git a/viz/curses/ecran.h b/viz/curses/ecran.h index e848a9d..c796f18 100644 --- a/viz/curses/ecran.h +++ b/viz/curses/ecran.h @@ -6,6 +6,7 @@ int kbhit(void); /* experimental */ int fond_ecran(char *titre); int aff_message(char *); +void bordure(WINDOW * w, char *texte, int type); int aff7segs_base(WINDOW * win, int lig, int col, int bits, int k);