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:
tth 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 */ else if (0x14==key) { /* request for terminal */
foo = run_the_terminal(sfd, " terminal ", 0); 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); sprintf(ligne, "retour terminal = %d", foo);
aff_message(ligne); sleep(1); 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); fprintf(stderr, "%s -> '%s'\n", __func__, where);
#endif #endif
return retval; return retval;

View File

@ -27,6 +27,8 @@ Global parametres;
/* -------------------------------------------------- */ /* -------------------------------------------------- */
void setup() { void setup() {
short foo;
Serial.begin(9600); Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT); pinMode(LED_BUILTIN, OUTPUT);
@ -34,6 +36,14 @@ void setup() {
pinMode(RELAIS_VENTILO, OUTPUT); pinMode(RELAIS_VENTILO, OUTPUT);
Serial.print("M booting\n"); Serial.print("M booting\n");
for (foo=0; foo<10; foo++) {
digitalWrite(LED_BUILTIN, HIGH);
delay(50);
digitalWrite(LED_BUILTIN, LOW);
delay(50);
}
/* 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
@ -83,12 +93,12 @@ void sendvalues(short *ptr)
{ {
int foo; int foo;
Serial.print("T"); prt("T");
for (foo=0; foo<NBVAL; foo++) { for (foo=0; foo<NBVAL; foo++) {
Serial.print(" "); prt(" ");
Serial.print(ptr[foo]); prt(ptr[foo]);
} }
Serial.print('\n'); prt('\n');
} }
/* -------------------------------------------------- */ /* -------------------------------------------------- */
void update_and_send(void) void update_and_send(void)
@ -115,7 +125,7 @@ void loop() {
key = Serial.read(); key = Serial.read();
switch (key) { switch (key) {
case 'U': case 'U':
Serial.println("M cli request"); prtln("M cli request");
phytocli(); phytocli();
break; break;
case '+': /* allume le frigo */ case '+': /* allume le frigo */

View File

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