From a872c48d7a334b07847f130de6730423da343868 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Wed, 5 Feb 2020 15:46:08 +0100 Subject: [PATCH] pwrswitch command line tool, proper masking of current values --- tools/pwrswitch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);} } } -- 2.43.0