Author: nwhitehorn
Date: Sun May 29 20:04:02 2011
New Revision: 222462
URL: http://svn.freebsd.org/changeset/base/222462

Log:
  Add the next digit of precision to temperatures, which I missed when
  converting the reporting format from degrees C to 0.1 degree K.

Modified:
  head/sys/powerpc/powermac/smu.c
  head/sys/powerpc/powermac/smusat.c

Modified: head/sys/powerpc/powermac/smu.c
==============================================================================
--- head/sys/powerpc/powermac/smu.c     Sun May 29 19:53:46 2011        
(r222461)
+++ head/sys/powerpc/powermac/smu.c     Sun May 29 20:04:02 2011        
(r222462)
@@ -854,7 +854,7 @@ smu_sensor_read(struct smu_sensor *sens)
                value <<= 1;
 
                /* Convert from 16.16 fixed point degC into integer 0.1 K. */
-               value = 10*(value >> 16) + 2732;
+               value = 10*(value >> 16) + ((10*(value & 0xffff)) >> 16) + 2732;
                break;
        case SMU_VOLTAGE_SENSOR:
                value *= sc->sc_cpu_volt_scale;

Modified: head/sys/powerpc/powermac/smusat.c
==============================================================================
--- head/sys/powerpc/powermac/smusat.c  Sun May 29 19:53:46 2011        
(r222461)
+++ head/sys/powerpc/powermac/smusat.c  Sun May 29 20:04:02 2011        
(r222462)
@@ -235,7 +235,7 @@ smusat_sensor_read(struct smu_sensor *se
                /* 16.16 */
                value <<= 10;
                /* From 16.16 to 0.1 C */
-               value = 10*(value >> 16) + 2732;
+               value = 10*(value >> 16) + ((10*(value & 0xffff)) >> 16) + 2732;
                break;
        case SMU_VOLTAGE_SENSOR:
                /* 16.16 */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to