#define TZ_ZEROC 2732 int val = (t - TZ_ZEROC) / 10;
That should works, I can't remember where I found the TZ_ZEROC value but someone on IRC gave me it a while ago. I use that for 1 year. 2013/2/26 Kevin Oberman <rkober...@gmail.com> > On Sun, Feb 24, 2013 at 11:19 PM, Joerg Wunsch <j...@uriah.heep.sax.de> > wrote: > > > As Kevin Oberman wrote: > > > > > > Values I'm geting are like this: > > > > 3732 > > > > > > > > while actual is: > > > > > > > > sysctl -n hw.acpi.thermal.tz0.temperature > > > > 55.0C > > > > > > > > > ACPI does not report temperature in degrees Celsius, but in tenths > > > of a degree Kelvin. So both agree. > > > > I wouldn't call it an agreement if one reports 373 K (= 100 °C), > > and the other one 55 °C ... > > > > (Btw., according to SI, Kelvin is a normal unit of measure, without > > the "degree".) > > -- > > cheers, Joerg .-.-. --... ...-- -.. . DL8DTL > > > > Ack! I should have actually LOOKED at the numbers. Silly mistake. But I > just looked at the source and ACPI does report temperature in tenths of a > degree Kelvin, so I am now baffled as to what is going on. > > Sorry, but SI or not, "tenths of a Kelvin" is just wrong. Actually, the > time you should properly omit the 'degrees' is when specifying a > temperature as in 373 K. > > Still, I can't explain the odd reading of the raw value Dimitry is > getting.. > -- > R. Kevin Oberman, Network Engineer > E-mail: rkober...@gmail.com > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org" > -- Demelier David _______________________________________________ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"