Re: [PATCH 1/3]iio:pressure:bmp280: fix pressure calculation

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

 



On 31/10/14 11:43, Vlad Dogaru wrote:
> On Fri, Oct 31, 2014 at 02:22:28AM +0100, Hartmut Knaack wrote:
>> According to the datasheet and as defined in struct bmp280_comp_press, dig_p1 is
>> of type u16, while dig_p2 to dig_p9 are of type s16. In
>> bmp280_read_compensation_press(), values read from the device were treated as
>> the wrong type.
>> In bmp280_read_press() the fractional part of the measured pressure is
>> calculated wrong. A better way is to use *val for the raw pressure and *val2 for
>> the quotient and let the core do the proper conversion using IIO_VAL_FRACTIONAL.
>>
>> Signed-off-by: Hartmut Knaack <knaack.h@xxxxxx>
> 
> Acked-by: Vlad Dogaru <vlad.dogaru@xxxxxxxxx>
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play.

Thanks,

Jonathan
> --
> 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
> 
--
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