Browse Source

apero du mercredi soir, no bug spotted

phyto 1 year ago
parent
commit
6583891486
2 changed files with 9 additions and 8 deletions
  1. 2
    2
      plot.sh
  2. 7
    6
      simulator/rdtemp/rdtemp.ino

+ 2
- 2
plot.sh View File

@@ -7,10 +7,10 @@ DATAFILE="serial/foo.dat"
7 7
 IMAGE="graphe.png"
8 8
 TMPFILE="/tmp/tmpdata"
9 9
 
10
-tail -700 < ${DATAFILE} > ${TMPFILE}
10
+tail -1200 < ${DATAFILE} > ${TMPFILE}
11 11
 
12 12
 gnuplot << __EOC__
13
-set term png 	size 1000,700
13
+set term png 	size 1400,700
14 14
 set output 	"${IMAGE}"
15 15
 set ytics	2
16 16
 set xtics	

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

@@ -12,6 +12,7 @@ void setup() {
12 12
   pinMode(LED_BUILTIN, OUTPUT);
13 13
   
14 14
   Serial.print("\n");
15
+  
15 16
   /* XXX */
16 17
   /*  changing the voltage reference of the ADC
17 18
    *  greatly increase the prcision on the limited
@@ -32,9 +33,8 @@ void updatevalues(short *ptr)
32 33
 {
33 34
   short foo, pass;
34 35
 
35
-  for (foo=0; foo<NBVAL; foo++) { 
36
-    ptr[foo] = 0;
37
-    }   
36
+  for (foo=0; foo<NBVAL; foo++) { ptr[foo] = 0; }
37
+  
38 38
   digitalWrite(LED_BUILTIN, HIGH);
39 39
   for (pass=0; pass<NB_PASSE; pass++) {
40 40
     for (foo=0; foo<NBVAL; foo++) {
@@ -42,9 +42,9 @@ void updatevalues(short *ptr)
42 42
       delay(100);
43 43
       }
44 44
     }
45
-  for (foo=0; foo<NBVAL; foo++) { 
46
-    ptr[foo] /= NB_PASSE;
47
-    }   
45
+    
46
+  for (foo=0; foo<NBVAL; foo++) { ptr[foo] /= NB_PASSE; }
47
+  
48 48
   digitalWrite(LED_BUILTIN, LOW);
49 49
 }
50 50
 /* -------------------------------------------------- */
@@ -67,6 +67,7 @@ void update_and_send(void)
67 67
   updatevalues(values);
68 68
   sendvalues(values);
69 69
   
70
+  
70 71
 }
71 72
 /* ================================================== */
72 73
 void loop() {

Loading…
Cancel
Save