sm8250-common: fod: Improve dimming formula
Change-Id: Ie043d49e8954d061f355ed51f4c02a2cacdb04ba
This commit is contained in:
parent
2a28b637c2
commit
c21283896c
@ -105,10 +105,14 @@ Return<int32_t> FingerprintInscreen::getDimAmount(int32_t) {
|
||||
float alpha;
|
||||
int realBrightness = get(BRIGHTNESS_PATH, 0);
|
||||
|
||||
if (realBrightness > 500) {
|
||||
alpha = 1.0 - pow(realBrightness / 2047.0 * 430.0 / 600.0, 0.455);
|
||||
if (realBrightness >= 500) {
|
||||
alpha = 1.0 - pow(realBrightness / 2047.0 * 430.0 / 600.0, 0.485);
|
||||
} else if (realBrightness >= 250) {
|
||||
alpha = 1.0 - pow(realBrightness / 2047.0 * 430.0 / 600.0, 0.530);
|
||||
} else if (realBrightness > 60) {
|
||||
alpha = 1.0 - pow(realBrightness / 1680.0, 0.525);
|
||||
} else {
|
||||
alpha = 1.0 - pow(realBrightness / 1680.0, 0.455);
|
||||
alpha = 1.0 - pow(realBrightness / 1680.0, 0.475);
|
||||
}
|
||||
|
||||
return 255 * alpha;
|
||||
|
Loading…
Reference in New Issue
Block a user