Browse Source

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

il y a vraiment un truc  qui m'echappe...
tth 6 months ago
parent
commit
af91555fe6
4 changed files with 19 additions and 8 deletions
  1. 1
    1
      essai.c
  2. 1
    1
      serial/serial.c
  3. 16
    6
      simulator/rdtemp/rdtemp.ino
  4. 1
    0
      ui/terminal.c

+ 1
- 1
essai.c View File

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

+ 1
- 1
serial/serial.c View File

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

+ 16
- 6
simulator/rdtemp/rdtemp.ino View File

@@ -27,6 +27,8 @@ Global parametres;
27 27
 
28 28
 /* -------------------------------------------------- */
29 29
 void setup() {
30
+short foo;
31
+
30 32
   Serial.begin(9600);
31 33
   pinMode(LED_BUILTIN, OUTPUT);
32 34
  
@@ -34,6 +36,14 @@ void setup() {
34 36
   pinMode(RELAIS_VENTILO, OUTPUT);
35 37
   
36 38
   Serial.print("M booting\n");  
39
+
40
+  for (foo=0; foo<10; foo++) {
41
+    digitalWrite(LED_BUILTIN, HIGH);
42
+    delay(50);
43
+    digitalWrite(LED_BUILTIN, LOW);
44
+    delay(50);
45
+    }
46
+
37 47
   /* XXX */
38 48
   /*  changing the voltage reference of the ADC
39 49
    *  greatly increase the prcision on the limited
@@ -83,12 +93,12 @@ void sendvalues(short *ptr)
83 93
 {
84 94
   int foo;
85 95
 
86
-  Serial.print("T");
96
+  prt("T");
87 97
   for (foo=0; foo<NBVAL; foo++) {
88
-    Serial.print(" ");
89
-    Serial.print(ptr[foo]);
98
+    prt(" ");
99
+    prt(ptr[foo]);
90 100
     }
91
-  Serial.print('\n');
101
+  prt('\n');
92 102
 }
93 103
 /* -------------------------------------------------- */
94 104
 void update_and_send(void)
@@ -115,7 +125,7 @@ void loop() {
115 125
     key = Serial.read();
116 126
     switch (key) {
117 127
       case 'U':
118
-          Serial.println("M cli request");
128
+          prtln("M cli request");
119 129
           phytocli();
120 130
           break;
121 131
       case '+':           /* allume le frigo */
@@ -135,7 +145,7 @@ void loop() {
135 145
           prtln(" bad control code");
136 146
           break;          
137 147
       }
138
- } 
148
+ }
139 149
  delay(parametres.delai);
140 150
 
141 151
  /* ETERNAL LOOP END HERE */

+ 1
- 0
ui/terminal.c View File

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

Loading…
Cancel
Save