Thread (32 messages) 32 messages, 6 authors, 2021-09-08

Re: [PATCH v3.1 2/3] iio: chemical: Add Senseair Sunrise 006-0-007 driver

From: Jacopo Mondi <jacopo@jmondi.org>
Date: 2021-08-30 16:27:00

On Mon, Aug 30, 2021 at 06:20:55PM +0200, Jacopo Mondi wrote:
quoted
quoted
+	case IIO_CHAN_INFO_SCALE:
+		/* Chip temperature scale = 1/100 */
IIO temperatures are measured in milli degrees.  1lsb = 1/100*1000 degrees centigrade seems very accurate
for a device like this!  I'm guessing this should be 10.
Ah yes, I thought it had to be given in the chip's native format,
which is 1/100 degree.

I guess I should then multiply by 10 the temperature raw read and
return IIO_VAL_INT here.
Of course I don't have to multiply by 10 the raw value, and that's
what the _scale attribute is for.

Fingers faster than brain it seems. And I'm a slow typer.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help