Commit 7cc0aed33b4db485956b9623fb53d8a7e0960522
1 parent
6b8856d8
MAJ
Showing
4 changed files
with
16 additions
and
15 deletions
Show diff stats
site/reception.php
... | ... | @@ -13,6 +13,7 @@ if(isset($_POST['sensor'])) |
13 | 13 | $a_simple = false; |
14 | 14 | $a_spi = false; |
15 | 15 | $n = false; |
16 | + $ordre = " ordre=0"; | |
16 | 17 | |
17 | 18 | foreach($_POST['sensor'] as $sensor => $value) |
18 | 19 | { |
... | ... | @@ -26,17 +27,17 @@ if(isset($_POST['sensor'])) |
26 | 27 | if($version == 0) |
27 | 28 | { |
28 | 29 | $a_simple = true; |
29 | - $arduino_simple = $arduino_simple.$val[0]." capteur=".$val[1]."-".$version."\n"; | |
30 | + $arduino_simple = $arduino_simple.$val[0]." capteur=".$val[1]."-".$version.$ordre."\n"; | |
30 | 31 | } |
31 | 32 | elseif($version == 1) |
32 | 33 | { |
33 | 34 | $a_spi = true; |
34 | - $arduino_spi = $arduino_spi.$val[0]." capteur=".$val[1]."-".$version."\n"; | |
35 | + $arduino_spi = $arduino_spi.$val[0]." capteur=".$val[1]."-".$version.$ordre."\n"; | |
35 | 36 | } |
36 | 37 | elseif($version == 2) |
37 | 38 | { |
38 | 39 | $n = true; |
39 | - $nucleo = $nucleo.$val[0]." capteur=".$val[1]."-".$version."\n"; | |
40 | + $nucleo = $nucleo.$val[0]." capteur=".$val[1]."-".$version.$ordre."\n"; | |
40 | 41 | } |
41 | 42 | } |
42 | 43 | ... | ... |
site/remove.php
... | ... | @@ -43,10 +43,10 @@ session_start(); |
43 | 43 | $ini = $nucleo; |
44 | 44 | } |
45 | 45 | |
46 | - $ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0\n"; | |
46 | + $ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0 ordre=2\n"; | |
47 | 47 | file_put_contents('upload/inventaire.ini', $ini); |
48 | 48 | |
49 | - /*$retour = array(); | |
49 | + $retour = array(); | |
50 | 50 | $statut; |
51 | 51 | exec("super cmd.sh", $retour, $statut); |
52 | 52 | |
... | ... | @@ -75,7 +75,7 @@ session_start(); |
75 | 75 | <div class="alert alert-secondary" role="alert"> |
76 | 76 | <?php echo $ansible;?> |
77 | 77 | </div> |
78 | - <?php*/ | |
78 | + <?php | |
79 | 79 | } |
80 | 80 | else |
81 | 81 | { | ... | ... |
site/removeRpi.php
... | ... | @@ -30,6 +30,7 @@ session_start(); |
30 | 30 | $a_simple = false; |
31 | 31 | $a_spi = false; |
32 | 32 | $n = false; |
33 | + $ordre = " ordre=2"; | |
33 | 34 | |
34 | 35 | foreach($capteurs as $capteur) |
35 | 36 | { |
... | ... | @@ -39,17 +40,17 @@ session_start(); |
39 | 40 | if($version == 0) |
40 | 41 | { |
41 | 42 | $a_simple = true; |
42 | - $arduino_simple = $arduino_simple.$raspberry." capteur=".$numero."-".$version." setup=0\n"; | |
43 | + $arduino_simple = $arduino_simple.$raspberry." capteur=".$numero."-".$version." setup=0".$ordre."\n"; | |
43 | 44 | } |
44 | 45 | elseif($version == 1) |
45 | 46 | { |
46 | 47 | $a_spi = true; |
47 | - $arduino_spi= $arduino_spi.$raspberry." capteur=".$numero."-".$version." setup=0\n"; | |
48 | + $arduino_spi= $arduino_spi.$raspberry." capteur=".$numero."-".$version." setup=0".$ordre."\n"; | |
48 | 49 | } |
49 | 50 | elseif($version == 2) |
50 | 51 | { |
51 | 52 | $n = true; |
52 | - $nucleo = $nucleo.$raspberry." capteur=".$numero."-".$version." setup=0\n"; | |
53 | + $nucleo = $nucleo.$raspberry." capteur=".$numero."-".$version." setup=0".$ordre."\n"; | |
53 | 54 | } |
54 | 55 | } |
55 | 56 | |
... | ... | @@ -60,7 +61,8 @@ session_start(); |
60 | 61 | if(removeRpi($_POST['ip'])) |
61 | 62 | { |
62 | 63 | file_put_contents('upload/inventaire.ini', $ini); |
63 | - /*$retour = array(); | |
64 | + | |
65 | + $retour = array(); | |
64 | 66 | $statut; |
65 | 67 | exec("super cmd.sh", $retour, $statut); |
66 | 68 | |
... | ... | @@ -89,7 +91,7 @@ session_start(); |
89 | 91 | <div class="alert alert-secondary" role="alert"> |
90 | 92 | <?php echo $ansible;?> |
91 | 93 | </div> |
92 | - <?php*/ | |
94 | + <?php | |
93 | 95 | } |
94 | 96 | else |
95 | 97 | { | ... | ... |
site/stop.php
1 | 1 | <?php |
2 | 2 | require_once("accesBase.php"); |
3 | -include("date.php"); | |
3 | +include("data.php"); | |
4 | 4 | |
5 | 5 | $arduino_simple = "[Arduino_stop]\r\n"; |
6 | 6 | $arduino_spi = "[Arduino_stop]\r\n"; |
... | ... | @@ -23,10 +23,9 @@ elseif($version == 2) |
23 | 23 | |
24 | 24 | $numero = getNumero($_POST['nom']); |
25 | 25 | $raspberry = getRaspberry($_POST['nom']); |
26 | -$ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0\n"; | |
26 | +$ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0 ordre=1\n"; | |
27 | 27 | file_put_contents('upload/inventaire.ini', $ini); |
28 | 28 | |
29 | -/* | |
30 | 29 | $retour = array(); |
31 | 30 | $statut; |
32 | 31 | exec("super cmd.sh", $retour, $statut); |
... | ... | @@ -58,6 +57,5 @@ for($i = 0; $i<$size; $i++) |
58 | 57 | </div> |
59 | 58 | |
60 | 59 | <?php |
61 | -*/ | |
62 | 60 | //header("Location: data.php"); |
63 | 61 | ?> | ... | ... |