From: Michael Gernoth Date: Sun, 8 Feb 2009 12:06:51 +0000 (+0100) Subject: fix boardstatus output X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/7ef02e7634bc62e7d7d6f1c2a4b350bff8af434a fix boardstatus output --- diff --git a/rsbs2.pl b/rsbs2.pl index 7f5cc0f..17f33dc 100755 --- a/rsbs2.pl +++ b/rsbs2.pl @@ -411,19 +411,21 @@ sub status { print "COM redirection:\t" . (($bs & 0x100000) ? "ON" : "OFF") . "\n"; print "UART redirect:\t\t" . (($bs & 0x200000) ? "ON" : "OFF") . "\n"; print "UART redirect pending:\t" . (($bs & 0x400000) ? "TRUE" : "FALSE") . "\n"; + print "Hex BoardStatus:\t${boardstatus}\n"; my $fws = hex ($boardfwstatus); print "FW status:\t\t"; if ($fws == 3 || $fws == 32771) { - print "WAITING\n"; + print "WAITING"; } else { - print "DONE\n"; + print "DONE"; } + print " (${boardfwstatus})\n"; if (($fws & 0x8080) || ($fws & 0x80)) { printf("FW error:\t\t0x%02x\n", ($fws & 0xff)); } - print "boardstatus:\t\t${boardstatus}\n"; - print "boardfwstatus:\t\t${boardfwstatus}\n"; - print "fw upgrade progress:\t${boardfwprogress}\n"; + if ($fws != 0) { + print "FW upgrade progress:\t${boardfwprogress}\n"; + } } sub login {