]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
pwrswitch command line tool, proper masking of current values
authorJan Michel <j.michel@gsi.de>
Wed, 5 Feb 2020 14:46:08 +0000 (15:46 +0100)
committerJan Michel <j.michel@gsi.de>
Wed, 5 Feb 2020 14:46:08 +0000 (15:46 +0100)
tools/pwrswitch.pl

index ed67d0a3a344e5989c51567411c9df17131e18ae..64655db7bd0975c7f4dab0decb56f9bed647b901 100755 (executable)
@@ -162,7 +162,7 @@ if($args <= 1 || 1) {
 
     if(($s & 0xf0) == 0xe0) {printf(" $n\tERR\t\t (%3i)\n",$lim&0x3FF);}
     if(($s & 0xff) == 0x00) {printf(" $n\t---   \t\t (%3i)\n",$lim&0x3FF);}
-    if(($s & 0xff) == 0x01) {printf(" $n\t%3imA\t %3imA\t (%3i)\n",$curr,$avg,$lim&0x3FF);}
+    if(($s & 0xff) == 0x01) {printf(" $n\t%3imA\t %3imA\t (%3i)\n",$curr&0x7ff,$avg&0x7ff,$lim&0x3FF);}
     }
   
   }