From: Jan Michel Date: Wed, 5 Feb 2020 14:46:08 +0000 (+0100) Subject: pwrswitch command line tool, proper masking of current values X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=a872c48d7a334b07847f130de6730423da343868;p=daqtools.git pwrswitch command line tool, proper masking of current values --- diff --git a/tools/pwrswitch.pl b/tools/pwrswitch.pl index ed67d0a..64655db 100755 --- a/tools/pwrswitch.pl +++ b/tools/pwrswitch.pl @@ -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);} } }