[OpenBIOS] r536 - dev/olpc/kb3700

svn at openbios.org svn at openbios.org
Wed Aug 15 04:28:29 CEST 2007


Author: rsmith
Date: 2007-08-15 04:28:29 +0200 (Wed, 15 Aug 2007)
New Revision: 536

Modified:
   dev/olpc/kb3700/battery.fth
Log:
OLPC: Remove some spaces from .bat so that the output will fit on a sigle line
OLPL: Prior to when the EC firmware reads the mfg info and battery type from the battery EEPROM or when there is no battery 
      it sets these values to zero make the status indicators just print blanks for zero.
 


Modified: dev/olpc/kb3700/battery.fth
===================================================================
--- dev/olpc/kb3700/battery.fth	2007-08-14 19:03:40 UTC (rev 535)
+++ dev/olpc/kb3700/battery.fth	2007-08-15 02:28:29 UTC (rev 536)
@@ -58,12 +58,14 @@
 
 : .bat-type  ( -- )
    bat-type@  dup 4 rshift  case   ( type )
+      0  of  ." "      endof
       1  of  ." GPB "  endof
       2  of  ." BYD "  endof
       ." UnknownVendor "
    endcase                         ( type )
 
    h# 0f and  case                 ( )
+      0  of  ." "           endof
       1  of  ." NiMH  "     endof
       2  of  ." LiFePO4  "  endof
       ." UnknownType  "
@@ -79,16 +81,16 @@
 : .%  ( n -- )  2.d ." %" ;
 : .bat  ( -- )
    bat-status@  ( stat )
-   ." AC: "  dup h# 10 and  if  ." on   "  else  ." off  "  then  ( stat )
-   ." PCB: "  pcb-temp 2.d ." C  "
+   ." AC: "  dup h# 10 and  if  ." on  "  else  ." off "  then  ( stat )
+   ." PCB: "  pcb-temp 2.d ." C "
 
    dup 1 and  if
       ." Battery: "
       .bat-type
-      soc .%   ."   "
-      uvolt@  .milli  ." V  "
-      cur@  .milli  ." A  "
-      bat-temp 2.d ." C  "
+      soc .%   ."  "
+      uvolt@  .milli  ." V "
+      cur@  .milli  ." A "
+      bat-temp 2.d ." C "
       dup 2 and  if  ." full "  then
       dup 4 and  if  ." low "  then
       dup 8 and  if  ." error "  then




More information about the OpenBIOS mailing list