pull/2/merge
SP9SKP 2023-10-26 08:26:11 +02:00
rodzic 0c2838a2b0
commit cdd40355cc
3 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -77,7 +77,7 @@ function getDataWf(){
if($p=='0' || $p=='') echo "<p id=\"switch_txt\"></p>"; if($p=='0' || $p=='') echo "<p id=\"switch_txt\"></p>";
if($p>1) include 'sdr.php'; if($p>1 && $p!="A") include 'sdr.php';
if($p=='A') echo "<p id=\"switch_txt\"></p>"; if($p=='A') echo "<p id=\"switch_txt\"></p>";
?> ?>

Wyświetl plik

@ -1,7 +1,7 @@
<?php <?php
$addn=0; $addn=0;
$save=0; $save=0;
$fil="";
$i=0; $i=0;
$fil = scandir('CFG'); $fil = scandir('CFG');
foreach ($fil as $key => $value) { foreach ($fil as $key => $value) {

Wyświetl plik

@ -38,29 +38,29 @@ function GreenYellowRed($number) {
function printSDR($fil){ function printSDR($fil){
if (($handle = fopen($fil, "r")) !== FALSE) { if (($handle = fopen($fil, "r")) !== FALSE) {
$line = fgets($handle); $line = fgets($handle);
if($line{2}=='1') if($line[2]=='1')
echo "<table width=380 cellspacing=0><tr><th bgcolor=#FFFFAA>Freq:</th><td bgcolor=#FFFFAA>".$line{2}.$line{3}.$line{4}.$line{5}.".".$line{6}.$line{7}." MHz</td>"; echo "<table width=380 cellspacing=0><tr><th bgcolor=#FFFFAA>Freq:</th><td bgcolor=#FFFFAA>".$line[2].$line[3].$line[4].$line[5].".".$line[6].$line[7]." MHz</td>";
else else
echo "<table width=380 cellspacing=0><tr><th bgcolor=#FFFFAA>Freq:</th><td bgcolor=#FFFFAA>".$line{2}.$line{3}.$line{4}.".".$line{5}.$line{6}.$line{7}." MHz</td>"; echo "<table width=380 cellspacing=0><tr><th bgcolor=#FFFFAA>Freq:</th><td bgcolor=#FFFFAA>".$line[2].$line[3].$line[4].".".$line[5].$line[6].$line[7]." MHz</td>";
$line = fgets($handle); $line = fgets($handle);
echo "<th bgcolor=#AAFFAA>PPM:</th><td bgcolor=#AAFFAA>".$line{2}.$line{3}."</td>"; echo "<th bgcolor=#AAFFAA>PPM:</th><td bgcolor=#AAFFAA>".$line[2].$line[3]."</td>";
$line = fgets($handle); $line = fgets($handle);
echo "<th bgcolor=#11FFFF>Gain:</th><td bgcolor=#11FFFF>".$line{2}.$line{3}."</td></tr></table><br>"; echo "<th bgcolor=#11FFFF>Gain:</th><td bgcolor=#11FFFF>".$line[2].$line[3]."</td></tr></table><br>";
echo "<table>"; echo "<table>";
while (($line = fgets($handle)) !== false) { while (($line = fgets($handle)) !== false) {
$arr = explode(";",$line); $arr = explode(";",$line);
echo "<tr>"; echo "<tr>";
$p=ord($line{16}); $p=ord($line[16]);
$off=0; $off=0;
if($line{3}=='1'){ if($line[3]=='1'){
echo "<th>".$line{0}.$line{1}." : ".$line{3}.$line{4}.$line{5}.$line{6}.".".$line{7}.$line{8}." MHz</td><td align=right>".intval($arr[2])."kHz</td><th> (".$p."dB)</th>"; echo "<th>".$line[0].$line[1]." : ".$line[3].$line[4].$line[5].$line[6].".".$line[7].$line[8]." MHz</td><td align=right>".intval($arr[2])."kHz</td><th> (".$p."dB)</th>";
$off=1; $off=1;
} }
else else
echo "<th>".$line{0}.$line{1}." : ".$line{3}.$line{4}.$line{5}.".".$line{6}.$line{7}.$line{8}." MHz</td><td align=right>".intval($arr[2])."kHz</td><th> (".$p."dB)</th>"; echo "<th>".$line[0].$line[1]." : ".$line[3].$line[4].$line[5].".".$line[6].$line[7].$line[8]." MHz</td><td align=right>".intval($arr[2])."kHz</td><th> (".$p."dB)</th>";
for($i=0;$i<16;$i++){ for($i=0;$i<16;$i++){
$p=ord($line{$i+16+$off}); $p=ord($line[$i+16+$off]);
echo '<td bgcolor="#'.GreenYellowRed($p*1.33).'">&nbsp;</td>'; echo '<td bgcolor="#'.GreenYellowRed($p*1.33).'">&nbsp;</td>';
} }
echo "</tr>"; echo "</tr>";