c825216f
lwadbled
feat(main.php): R...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
/* Filtre CH2 */
if(array_key_exists('filt_c2',$_POST)){
$filt_c2 = shell_exec('lxi scpi -a '.$adresse.' "c2:filt?"');
if(strpos($filt_c2,"ON")!=false){
shell_exec('lxi scpi -a '.$adresse.' "c2:filt off"');
}else{
shell_exec('lxi scpi -a '.$adresse.' "c2:filt on"');
}
}
$trace_c2=shell_exec('lxi scpi -a '.$adresse.' "c2:tra?"');
if(strpos($trace_c2,"OFF")!=false){
$filt_c2="OFF";
}else{
$filt_c2 = shell_exec('lxi scpi -a '.$adresse.' "c2:filt?"');
}
/* Commande type de filtre CH2 */
if(array_key_exists('c2_filts',$_POST)){
$c2filts=$_POST['c2_filts'];
if($c2filts=="LP"){
$limite_sup = floatval($_POST['lim_sup']);
shell_exec('lxi scpi -a '.$adresse.' "c2:filts type,'.$c2filts.',upplimit,'.$limite_sup.'MHz"');
}else if($c1filts=="HP"){
$limite_inf = $_POST['lim_inf'];
shell_exec('lxi scpi -a '.$adresse.' "c2:filts type,'.$c2filts.',lowlimit,'.$limite_inf.'MHz"');
}else{
$limite_sup = $_POST['lim_sup'];
$limite_inf = $_POST['lim_inf'];
if($limite_inf>=$limite_sup){
$limite_inf=$limite_sup-5;
}
shell_exec('lxi scpi -a '.$adresse.' "c2:filts type,'.$c2filts.',upplimit,'.$limite_sup.'MHz,lowlimit,'.$limite_inf.'MHz"');
}
}
$c2filts=shell_exec('lxi scpi -a '.$adresse.' "c2:filts?"');
?>
|