Merge branch 'master' of ssh://tetalab.org:2213/tTh/DD2-monitor

il y a vraiment un truc  qui m'echappe...
This commit is contained in:
Tonton Th 2019-05-22 20:02:23 +02:00
commit af91555fe6
4 changed files with 19 additions and 8 deletions

View File

@ -52,7 +52,7 @@ for (idx=0; idx<nbloops; idx++) {
else if (0x14==key) { /* request for terminal */
foo = run_the_terminal(sfd, " terminal ", 0);
putbyte(sfd, 'x'); putbyte(sfd, '\r');
// putbyte(sfd, 'x'); putbyte(sfd, '\r');
sprintf(ligne, "retour terminal = %d", foo);
aff_message(ligne); sleep(1);
}

View File

@ -252,7 +252,7 @@ for(;;) {
}
#if DEBUG_LEVEL
#if DEBUG_LEVEL > 1
fprintf(stderr, "%s -> '%s'\n", __func__, where);
#endif
return retval;

View File

@ -27,6 +27,8 @@ Global parametres;
/* -------------------------------------------------- */
void setup() {
short foo;
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
@ -34,6 +36,14 @@ void setup() {
pinMode(RELAIS_VENTILO, OUTPUT);
Serial.print("M booting\n");
for (foo=0; foo<10; foo++) {
digitalWrite(LED_BUILTIN, HIGH);
delay(50);
digitalWrite(LED_BUILTIN, LOW);
delay(50);
}
/* XXX */
/* changing the voltage reference of the ADC
* greatly increase the prcision on the limited
@ -83,12 +93,12 @@ void sendvalues(short *ptr)
{
int foo;
Serial.print("T");
prt("T");
for (foo=0; foo<NBVAL; foo++) {
Serial.print(" ");
Serial.print(ptr[foo]);
prt(" ");
prt(ptr[foo]);
}
Serial.print('\n');
prt('\n');
}
/* -------------------------------------------------- */
void update_and_send(void)
@ -115,7 +125,7 @@ void loop() {
key = Serial.read();
switch (key) {
case 'U':
Serial.println("M cli request");
prtln("M cli request");
phytocli();
break;
case '+': /* allume le frigo */
@ -135,7 +145,7 @@ void loop() {
prtln(" bad control code");
break;
}
}
}
delay(parametres.delai);
/* ETERNAL LOOP END HERE */

View File

@ -15,6 +15,7 @@
#include <ncurses.h>
#include "../serial/serial.h"
#include "../viz/curses/ecran.h"
#include "terminal.h"
extern int verbosity;