mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 15:03:53 +01:00
Merge pull request #16136 from silkeh/pr/bme280-pa
driver/bmx280: increase accuracy of SAUL pressure readings
This commit is contained in:
commit
e54af1ce40
@ -35,9 +35,11 @@ static int read_temperature(const void *dev, phydat_t *res)
|
||||
|
||||
static int read_pressure(const void *dev, phydat_t *res)
|
||||
{
|
||||
res->val[0] = bmx280_read_pressure((bmx280_t *)dev) / 100;
|
||||
res->unit = UNIT_PA;
|
||||
res->scale = 2;
|
||||
res->scale = 0;
|
||||
|
||||
int32_t val = bmx280_read_pressure((bmx280_t *)dev);
|
||||
phydat_fit(res, &val, 1);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user