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.