Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2013 16:37:49 +0100
From:      David Demelier <demelier.david@gmail.com>
To:        Kevin Oberman <rkoberman@gmail.com>
Cc:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, freebsd-acpi@freebsd.org
Subject:   Re: acpi_termal sysctl interface strange temperature value
Message-ID:  <CAO%2BPfDfZ8MiuJ2cf-_YDx2CfXCjeXm2EMryZRHa6j85ZeCPaYQ@mail.gmail.com>
In-Reply-To: <CAN6yY1vXCRbxObaer2nhhYUMipACvZeh3St-RkxR_60HMx7AsA@mail.gmail.com>
References:  <20130225014000.GA6413@aperturescience.org> <CAN6yY1uPiBh6Dv-wsLq1DMcXL%2BD%2Bq_=7s%2B8JbsLk15sN-ZQ-aw@mail.gmail.com> <20130225071929.GM28792@uriah.heep.sax.de> <CAN6yY1vXCRbxObaer2nhhYUMipACvZeh3St-RkxR_60HMx7AsA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
#define TZ_ZEROC 2732

int val =3D (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 <rkoberman@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 (=3D 100 =C2=B0C),
> > and the other one 55 =C2=B0C ...
> >
> > (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: rkoberman@gmail.com
> _______________________________________________
> freebsd-acpi@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
> To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org"
>



--=20
Demelier David



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAO%2BPfDfZ8MiuJ2cf-_YDx2CfXCjeXm2EMryZRHa6j85ZeCPaYQ>