Commit b5feb58
committed
Fixed BME680 loss of precision int math error in pressure/altitude measurements
BME680.pressure / 100 was integer division before being passed onward resulting
in loss of sensor resoluiton for both altitude and pressure changes.
- Changed to float math to fix the value only moving in 1hPa steps
- Pressure/altitude should no longer appear "stuck" waiting to jump
the next 1hPa change
- Tested on RAK19003+BME680
It looks like BME280, BMP280, etc. should not be affected as their
readPressure() is a float. BMP085 may have a similar problem, but
I do not have one to test with.1 parent a81dcb3 commit b5feb58
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| |||
0 commit comments