]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
less blinking in normal data taking. mt
authorhadaq <jan@lxhadeb07>
Sun, 3 Mar 2019 17:31:05 +0000 (18:31 +0100)
committerhadaq <jan@lxhadeb07>
Sun, 3 Mar 2019 17:31:05 +0000 (18:31 +0100)
hmon/permanent/hmon_eb_run.pl

index 059015c42fbcccfb8b89fee7aa9e4ea7f7ec562c..2686219a146846b03fc515bdf7774f2a70d9d530 100755 (executable)
@@ -31,8 +31,8 @@ my @byteshist;
 
 # with this switch disable qalog and enable printout only JAM
 my $opt_debug = 0;
-
-my $error_counter=0;
+my $error_counter = 0;
+my $persistent_error_state;
 
 # sub cntbits32 {
 #   return (unpack('%32b*', pack('i',$_[0])));
@@ -305,14 +305,16 @@ while (1) {
 
   #########################
 
-  if ($qastate == QA::ERROR) {
-    if ($error_counter <= 4) {
+  if($qastate == QA::ERROR) {
+    $error_counter++;
+    if($error_counter <= 4) {
       $qastate = QA::OK;
-      $error_counter++;
-    } else {
-      $error_counter=0;
+      $qamsg   .=  " error_counter: $error_counter ";
     }
   }
+  else {
+    $error_counter=0;
+  }
 
 
   if ($trbneterr) {