mirror of https://github.com/aredn/aredn.git
Merge: feature: enhance snrlog to squareLine, local TZ, fix test condition
This commit is contained in:
commit
02a271503e
|
@ -33,6 +33,9 @@
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
#delay just after rssi_monitor has a chance to run noise floor calibration
|
||||||
|
sleep 5;
|
||||||
|
|
||||||
$MAXLINES=2880; # 2 days worth
|
$MAXLINES=2880; # 2 days worth
|
||||||
$tmpdir="/tmp/snrlog";
|
$tmpdir="/tmp/snrlog";
|
||||||
$lastdat="/tmp/snr.dat";
|
$lastdat="/tmp/snr.dat";
|
||||||
|
|
|
@ -40,6 +40,7 @@ $debug = 0;
|
||||||
BEGIN {push @INC, '/www/cgi-bin'};
|
BEGIN {push @INC, '/www/cgi-bin'};
|
||||||
use perlfunc;
|
use perlfunc;
|
||||||
|
|
||||||
|
chomp ($tzone=`date +%Z`);
|
||||||
read_query_string();
|
read_query_string();
|
||||||
|
|
||||||
# collect some variables
|
# collect some variables
|
||||||
|
@ -89,7 +90,7 @@ $header = <<EOF;
|
||||||
verticalAlign: "center", // top, center, bottom
|
verticalAlign: "center", // top, center, bottom
|
||||||
},
|
},
|
||||||
axisX: {
|
axisX: {
|
||||||
title: "Time (in UTC)",
|
title: "Time (in $tzone)",
|
||||||
labelFontSize: 10,
|
labelFontSize: 10,
|
||||||
labelAngle: -45,
|
labelAngle: -45,
|
||||||
},
|
},
|
||||||
|
@ -99,16 +100,16 @@ $header = <<EOF;
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
type: "spline",
|
type: "stepLine",
|
||||||
showInLegend: true,
|
showInLegend: true,
|
||||||
legendText: "Signal",
|
legendText: "Signal",
|
||||||
toolTipContent: "Signal: {y}db @ {label}",
|
toolTipContent: "Signal: {y}dBm @ {label}",
|
||||||
dataPoints: dps[0]
|
dataPoints: dps[0]
|
||||||
},{
|
},{
|
||||||
type: "line",
|
type: "line",
|
||||||
showInLegend: true,
|
showInLegend: true,
|
||||||
legendText: "Noise",
|
legendText: "Noise",
|
||||||
toolTipContent: "Noise: {y}db @ {label}",
|
toolTipContent: "Noise: {y}dBm @ {label}",
|
||||||
dataPoints: dps[1]
|
dataPoints: dps[1]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -67,10 +67,9 @@ if($parms{"realtime"}) {
|
||||||
} else {
|
} else {
|
||||||
# ==== ARCHIVE DATA =====
|
# ==== ARCHIVE DATA =====
|
||||||
# --- Load the snr data into an array
|
# --- Load the snr data into an array
|
||||||
if($parms{device} == '') { $parms{device}="strongest"; }
|
if($parms{device} eq '') { $parms{device}="strongest"; }
|
||||||
|
|
||||||
$filename=$dirname . "/" . $parms{device};
|
$filename=$dirname . "/" . $parms{device};
|
||||||
|
|
||||||
open my $fh, '<', $filename or die "Could not open file '$filename' $!";
|
open my $fh, '<', $filename or die "Could not open file '$filename' $!";
|
||||||
chomp(my @lines = <$fh>);
|
chomp(my @lines = <$fh>);
|
||||||
close $fh;
|
close $fh;
|
||||||
|
|
Loading…
Reference in New Issue