sub MakeRate {
my ($pos,$width,$usets,$t) = @_;
my $res;
-
+ return unless defined $t;
+
foreach my $b (keys $t) {
for my $i (0..((scalar @{$t->{$b}{value}})-1)) {
my $value = $t->{$b}{value}[$i]||0;
if( defined $regs->{$config{CtsAddress}}) {
my $linkActive = $regs->{$config{CtsAddress}}[0] & 0x20;
- my $pulserFreqKHz = 125e3 / $regs->{$config{CtsAddress}}[1];
+ my $pulserFreqKHz = $regs->{$config{CtsAddress}}[1] | 0;
+ $pulserFreqKHz = 125e3 / ($regs->{$config{CtsAddress}}[1]) if $regs->{$config{CtsAddress}}[1];
$dlmCnt = $linkActive ? $regs->{$config{CtsAddress}}[0xa] : -1;
$value = "$dlmCnt DLMs";
my $plot2 = ();
$plot2->{name} = "HeatmapRich";
-$plot2->{file} = Dmon::DMONDIR."heatmaprich";
+$plot2->{file} = Dmon::DMONDIR."HeatmapRich";
$plot2->{entries} = 33;
$plot2->{curves} = 33;
$plot2->{type} = HPlot::TYPE_HEATMAP;
$plot2->{xmax} = 32.5;
$plot2->{ymin} = 0.5;
$plot2->{ymax} = 32.5;
-$plot2->{showvalues} = 1;
+$plot2->{showvalues} = 0;
$plot2->{xlabel} = "column";
$plot2->{ylabel} = "row";
HPlot::PlotInit($plot2);
while (1) {
my $t = trb_register_read_mem(0xfe48,0xc000,0,33);
+
if (defined $old) {
foreach my $b (keys %$o) {
for my $v (0..32) {
-#!/usr/bin/perl -w
+M#!/usr/bin/perl -w
use warnings;
use POSIX qw(strftime);
while(1) {
my $r = trb_registertime_read($config{CtsAddress},0xa002) ;
- my $t = Dmon::MakeRate(0,32,1,$r);
+ my $t;
+ $t = Dmon::MakeRate(0,32,1,$r) if( defined $r );
if( defined $t) {
$summing += $t->{$config{CtsAddress}}{rate}[0];