From: Andreas Neiser Date: Wed, 17 Jun 2015 13:57:07 +0000 (+0200) Subject: adc.pl: Fix some bug adc_init when reduced number of ADCs present X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=3183cf5d677b669e1210c4c18db00c4a3a207040;p=daqtools.git adc.pl: Fix some bug adc_init when reduced number of ADCs present --- diff --git a/tools/adc.pl b/tools/adc.pl index ed0b486..501b385 100755 --- a/tools/adc.pl +++ b/tools/adc.pl @@ -146,6 +146,7 @@ sub adc_init { &set_optimal_phases; print ">>> Check ADCs again...\n"; my @good = map {$_->[0]} &adc_testall; # no phases given, so single element arrays expected + @good = grep { defined $_ } @good; # not all adcs might have been tested #print Dumper(\@good); # check if all ADCs are good if (@good == grep { $_ } @good) { @@ -496,6 +497,7 @@ sub set_optimal_phases { @adcs = ($adc); # used by adc_phase adc_phase($opt_phase); #printf("Set ADC %02d to optimal phase of %03d degrees\n", $adc, $opt_phase*60); + @adcs = @old_adcs; } @adcs = @old_adcs;