Commit ec9f9ab04e7e8e636aa3f86296c712aeff434592
1 parent
627c235b
MAJ site
Showing
1 changed file
with
0 additions
and
41 deletions
Show diff stats
site/ansibleSensor.php~ deleted
@@ -1,41 +0,0 @@ | @@ -1,41 +0,0 @@ | ||
1 | -$ini = ""; | ||
2 | -$arduino_simple = "[Arduino_init]\r\n"; | ||
3 | -$arduino_spi = "[Arduino_spi_init]\r\n"; | ||
4 | -$nucleo = "[Nucleo_init]\r\n"; | ||
5 | - | ||
6 | - | ||
7 | - | ||
8 | -foreach($_POST['sensor'] as $sensor => $value) | ||
9 | -{ | ||
10 | - $version = -1; | ||
11 | - $val = explode(":", $value); | ||
12 | - | ||
13 | - if(count($types)<>0 && !in_array($val[2], $types)) {$err = true;} | ||
14 | - else {$types[] = $val[2];} | ||
15 | - | ||
16 | - $version = getSensorVersion($val[0], $val[1]); | ||
17 | - if($version == 0) | ||
18 | - { | ||
19 | - $a_simple = true; | ||
20 | - $arduino_simple = $arduino_simple.$val[0]." capteur=".$val[1]."\n"; | ||
21 | - } | ||
22 | - elseif($version == 1) | ||
23 | - { | ||
24 | - $a_spi = true; | ||
25 | - $arduino_spi = $arduino_spi.$val[0]." capteur=".$val[1]."\n"; | ||
26 | - } | ||
27 | - elseif($version == 2) | ||
28 | - { | ||
29 | - $n = true; | ||
30 | - $nucleo = $nucleo.$val[0]." capteur=".$val[1]."\n"; | ||
31 | - } | ||
32 | -} | ||
33 | - | ||
34 | -if($a_simple) {$ini = $ini.$arduino_simple."\n";} | ||
35 | -if($a_spi) {$ini = $ini.$arduino_spi."\n";} | ||
36 | -if($n) {$ini = $ini.$nucleo."\n";} | ||
37 | - | ||
38 | -if(!$err) | ||
39 | -{ | ||
40 | - file_put_contents('upload/inventaire.ini', $ini); | ||
41 | -} | ||
42 | \ No newline at end of file | 0 | \ No newline at end of file |