Re: [PATCH] thermal: generic-adc: Fix linear temperature approximation

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

 




On Wednesday 19 October 2016 01:01 AM, Paweł Jarosz wrote:
In current version of the driver there is error in temperature
calculation.

So lets fix it using proper linear function.

Signed-off-by: Paweł Jarosz <paweljarosz3691@xxxxxxxxx>

Per my calculation, existing and your equation is same as both are doing linear interpolation.

Only think I have seen is that I have used 1000 for two consecutive temp difference and you used (t2 - t1), so your is better in this case but still the equation is same.

The equation from you is

    t1 + (hi -val) * factor.

and existing one is
     t2 - (val -lo) * factor


factor is abs((t2-t1)/(hi-lo))

If my analysis is not correct then can you please provide the example with calculation for better understansing?


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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