Merge: feature: enhance snrlog to squareLine, local TZ, fix test condition

This commit is contained in:
AE6XE 2015-12-15 22:47:20 -08:00
commit 02a271503e
3 changed files with 9 additions and 6 deletions

View File

@ -33,6 +33,9 @@
=cut
#delay just after rssi_monitor has a chance to run noise floor calibration
sleep 5;
$MAXLINES=2880; # 2 days worth
$tmpdir="/tmp/snrlog";
$lastdat="/tmp/snr.dat";

View File

@ -40,6 +40,7 @@ $debug = 0;
BEGIN {push @INC, '/www/cgi-bin'};
use perlfunc;
chomp ($tzone=`date +%Z`);
read_query_string();
# collect some variables
@ -89,7 +90,7 @@ $header = <<EOF;
verticalAlign: "center", // top, center, bottom
},
axisX: {
title: "Time (in UTC)",
title: "Time (in $tzone)",
labelFontSize: 10,
labelAngle: -45,
},
@ -99,16 +100,16 @@ $header = <<EOF;
},
data: [
{
type: "spline",
type: "stepLine",
showInLegend: true,
legendText: "Signal",
toolTipContent: "Signal: {y}db @ {label}",
toolTipContent: "Signal: {y}dBm @ {label}",
dataPoints: dps[0]
},{
type: "line",
showInLegend: true,
legendText: "Noise",
toolTipContent: "Noise: {y}db @ {label}",
toolTipContent: "Noise: {y}dBm @ {label}",
dataPoints: dps[1]
}
],

View File

@ -67,10 +67,9 @@ if($parms{"realtime"}) {
} else {
# ==== ARCHIVE DATA =====
# --- Load the snr data into an array
if($parms{device} == '') { $parms{device}="strongest"; }
if($parms{device} eq '') { $parms{device}="strongest"; }
$filename=$dirname . "/" . $parms{device};
open my $fh, '<', $filename or die "Could not open file '$filename' $!";
chomp(my @lines = <$fh>);
close $fh;