Author: rsmith Date: Wed Nov 28 17:56:41 2012 New Revision: 3466 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3466
Log: OLPC: Fix battery temperature calculation error
Multiplier was not qualified with d# so on 1.5 (and probably 1.0) it was using 125 hex rather than 125 decimal.
Modified: dev/olpc/kb3700/batstat.fth
Modified: dev/olpc/kb3700/batstat.fth ============================================================================== --- dev/olpc/kb3700/batstat.fth Mon Nov 26 06:10:44 2012 (r3465) +++ dev/olpc/kb3700/batstat.fth Wed Nov 28 17:56:41 2012 (r3466) @@ -1,6 +1,6 @@ : wextend ( w -- n ) dup h# 8000 and if h# ffff.0000 or then ; \ Base unit for temperature is .125 degrees C -: >milli-degrees-c 125 * 5 rshift ; +: >milli-degrees-c d# 125 * 5 rshift ; : uvolt@ bat-voltage@ d# 9760 d# 32 */ ; : cur@ bat-current@ wextend d# 15625 d# 120 */ ; \ : pcb-temp ambient-temp@ >milli-degrees-c ;
openfirmware@openfirmware.info