mirror of https://github.com/aredn/aredn.git
feature: enhance snrlog to squareLine, local TZ, fix test condition
This commit is contained in:
parent
ad856844bf
commit
265d2eb196
|
@ -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";
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue