mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Fries <david@fries.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: W1: w1_slave units, standardize 1C or .001C?  Break API
Date: Tue, 22 Jan 2008 22:09:37 -0600	[thread overview]
Message-ID: <20080123040937.GB4025@spacedout.fries.net> (raw)
In-Reply-To: <47955ECB.3050100@zytor.com>

On Mon, Jan 21, 2008 at 07:11:07PM -0800, H. Peter Anvin wrote:
> H. Peter Anvin wrote:
> >Millikelvins would have the nice property of never being negative.  :)

True, but the sensor returns the value as a signed integer in C.  That
is where the earlier negative number problem was, it would have to do
yet another conversion to go to Kelvin, and it would be just one more
potential for error.  Everyone knows that a bad conversion doomed at
least one space craft, let's stick to Centigrade.

> Alternatively, centikelvins would fit nicely in 16 bits if anyone cares...
> 
> 655.35 K = 382.20 ?C = 719.96 ?F

The range for the sensor is -55 to 125 C, if an application didn't
care about precision they could store it in a signed 8 bit value just
fine.

-- 
David Fries <david@fries.net>
http://fries.net/~david/ (PGP encryption key available)

  parent reply	other threads:[~2008-01-23  4:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 23:15 David Fries
2008-01-22  1:08 ` H. Peter Anvin
2008-01-22  3:11   ` H. Peter Anvin
2008-01-22 21:07     ` Evgeniy Polyakov
2008-01-22 21:12       ` Evgeniy Polyakov
2008-01-23  4:09     ` David Fries [this message]
2008-01-23  4:22       ` H. Peter Anvin
2008-01-22 21:06 ` Evgeniy Polyakov
2008-01-23  4:00 David Fries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080123040937.GB4025@spacedout.fries.net \
    --to=david@fries.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®