use POSIX;
use Device::SerialPort;
use Data::Dumper;
+use Proc::Daemon;
use SVG;
approx_upper_rate => 4000,
plot_lower_limit => 0,
plot_upper_limit => 4000,
+ pidfile => "./coral_scanner.pid",
};
$self->{settings_desc} = {
is used for setting the value range of the plot",
plot_lower_limit => "lower contrast setting for the plot",
plot_upper_limit => "upper contrast setting for the plot",
-
+ pidfile => "/path/to/file of the lockfile for the scanning background process",
};
$self->{has_run} = {}; # remember which subs already have run
print '<div id="slider-range"></div>';
print br;
print "<input type='button' value='(re)plot' id='button_replot'>";
- print "<a href='coral_scanner.pl?sub=scan_to_ascii' target='_blank' id='button_ascii'><input type='button'
- value='scan to ascii'></a>";
+ print "<a href='coral_scanner.pl?sub=scan_to_ascii' target='_blank' id='button_ascii'
+ ><input type='button' value='scan to ascii'></a>";
print br;
print br;
print "estimated scan duration: ".hms_string($self->scan_ETA());
spectrum_bins => 24,
spectrum_delay => 1
};
+
+ $self->{settings_desc} = { # hard default settings
+ tty => "address of the serial interface",
+ baudrate => "baudrate of serial interface",
+ signal_zero => "comparator reference voltage setting equal to unplugged/shorted signal input",
+ veto_zero => "comparator reference voltage setting equal to unplugged/shorted veto signal input",
+ is_calibrated => "equals 1 if signal_zero and veto_zero have been calibrated by automatic scan procedure",
+ dead_time => "dead time of the counter in the unit of FPGA clock cycles (133MHz). An artificial dead time is introduced to avoid double triggering of the discriminator",
+ signal_thresh => "disciminator threshold of the signal input",
+ veto_thresh => "discriminator threshold of the veto input",
+ spectrum_start => "start threshold of spectral scan",
+ spectrum_stop => "stop/end threshold of spectral scan",
+ spectrum_bins => "number of bins for spectral scan",
+ spectrum_delay => "count integration time for each bin of spectral scan",
+ };
$self->{has_run} = {}; # remember which subs already have run