diff options
| author | 2021-04-27 17:18:00 -0700 | |
|---|---|---|
| committer | 2021-04-28 09:19:36 -0700 | |
| commit | 3dd8502af4d2955bb08f7db7e9724ac5c7e90f00 (patch) | |
| tree | a75cbf70d36a5dd2b458587b49d14fe2d6f1cdff /libs/gui/DisplayLuts.cpp | |
| parent | 5a7ea5165062ff28861e5c79da9de09c9a22ea75 (diff) | |
Only requantize sensor max range if significant
The previous computation that decided whether to adjust the sensor's
reported maximum range if not a multiple of the resolution was
susceptible to floating point error (e.g. considering 5.0 as not a
multiple of 0.1), so rework this to only update the maximum range and
print a warning log if the maximum range would be changed significantly
after requantization. We define significant here as resolution/8 (i.e.
the target quantization level).
Also, make the reported power clamping log more helpful.
Fixes: 182828004
Test: compare SensorService startup logs before & after change
Change-Id: I44e399a7aca6fe8ff02bd2840525c95798cda1f4
Diffstat (limited to 'libs/gui/DisplayLuts.cpp')
0 files changed, 0 insertions, 0 deletions