-m regamount Number of consecutive registers to show
-z style Selects one of the possible styles (deprecated)
-t title Name of the curve shown in key
+ -f fifomode
-output expects a string "(PNG|SVG).\$filename.\$xsize.\$ysize" to write to a file
-windowname Name of window (shown in titlebar after "Hadplot - "
-timeref In a differential plot, the endpoint with this addressis used for timestamping
$c = trb_register_read_mem(($address->[$i]),($register->[$i]),$fifomode->[$i],$regamount->[$i]) or die trb_strerror();
}
foreach my $s (sort keys %$c) {
+ my $lasttmp;
for(my $r = 0; $r < scalar @{$c->{$s}};$r++) {
my $tmp = ($c->{$s}->[$r]>>$regoffset->[$i])&(2**$regwidth->[$i]-1);
my $val = $tmp;
my $reg = $register->[$i]+$r;
if($ydiff) {
- if(defined $oldvals{$i}->{$board.$reg}) {
+ if ($fifomode->[$i]) {
+ $val = $tmp - $lasttmp;
+ $val += 2**$regwidth->[$i] if $val < 0;
+ $lasttmp = $tmp;
+ next if $r == 0;
+ }
+ elsif(defined $oldvals{$i}->{$board.$reg}) {
if ($oldvals{$i}->{$board.$reg} > $tmp) {
$val = $tmp - $oldvals{$i}->{$board.$reg} + 2**$regwidth->[$i];
}