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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 30, 2021 at 06:20:55PM +0200, Jacopo Mondi wrote:
> > > +	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.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux