From: mds4@verizon.net (Mark Studebaker)
To: lm-sensors@vger.kernel.org
Subject: Question concerning sensors chips.c alarm handling
Date: Thu, 19 May 2005 06:25:13 +0000 [thread overview]
Message-ID: <413E4372.9080309@verizon.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0409071447260.8167@malachi.lee.k12.nc.us>
rounding since sensors_get_feature() returns a float.
it ensures that you get back to the same integer bitmask you had to begin with.
mds
James Olin Oden wrote:
> Hi All,
>
> I was looking in the sensors program's chips.c file at the various
> print_*() routines and found the following code:
>
> if (!sensors_get_feature(*name,SENSORS_ADM1025_ALARMS,&cur))
> alarms = cur + 0.5;
> else {
> printf("ERROR: Can't get alarm data!\n");
> alarms = 0;
> }
>
> repeated in various routines for various chips. Why is 0.5 added to
> the alarm mask value?
>
> Thanks...james
>
> P.S. Looking at implenting a print routine for the lm93, and was
> basically looking at copying code from LM87 print routine and going
> from there.
>
>
next prev parent reply other threads:[~2005-05-19 6:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:25 Question concerning sensors chips.c alarm handling James Olin Oden
2005-05-19 6:25 ` Mark Studebaker [this message]
2005-05-19 6:25 ` Jean Delvare
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=413E4372.9080309@verizon.net \
--to=mds4@verizon.net \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.