Author: quozl Date: Tue Oct 25 08:16:34 2011 New Revision: 2654 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2654
Log: OLPC XO-1.75, XO-1.5, XO-1 - battery state of charge did not properly show 100%. The cause was that a previous definition of 2.d was being used, which used (.2), truncating any higher digits.
This wasn't a problem until the XO-1.75 EC started using 100% instead of 97% in commit ea52c0c.
Batteries moved from XO-1.75 to XO-1.5 and XO-1 may show 00% in watch-battery or .bat until this fix is released.
Modified: dev/olpc/kb3700/batstat.fth
Modified: dev/olpc/kb3700/batstat.fth ============================================================================== --- dev/olpc/kb3700/batstat.fth Tue Oct 25 00:57:39 2011 (r2653) +++ dev/olpc/kb3700/batstat.fth Tue Oct 25 08:16:34 2011 (r2654) @@ -79,8 +79,7 @@ if ." MPPT" then ;
-\needs 2.d : 2.d ( n -- ) push-decimal <# u# u#s u#> type pop-base ; -: .% ( n -- ) 2.d ." %" ; +: .% ( n -- ) push-decimal <# [char] % hold u# u#s u#> type pop-base ; : .bat ( -- ) bat-status@ ( stat ) ." AC:" dup h# 10 and if ." on " else ." off " then ( stat )
openfirmware@openfirmware.info