7 Commits

Author SHA1 Message Date
TH779
d9312e6399 raphael: light: Switch to green LED
* In raphael, the LED named green is on the left side of the motor, and
   the LED named blue is on the right side of the motor.
 * Switch to the LED (green) on the left side of the motor to keep with
   the stock behavior to prevent its light leakage.
 * Thanks to @Ashu7397 for the idea.

Signed-off-by: TH779 <i@779.moe>
Change-Id: I3c508d1f20e8b71b732edd24cd6aa4e4bbdc0632
2021-08-25 16:31:48 +08:00
Demon000
a194041f27 raphael: light: Simplify alpha scaling logic
Change-Id: I9b5c15d5ec4865d3bf829457d6f110ddb3af6e94
2021-07-27 21:10:06 +08:00
Demon000
62a0c2c8ef raphael: light: Do not turn on breathing for unlit hardware states
Change-Id: I093fb2fb81012a473eda232d3c3407d0e0791907
2021-07-27 21:10:06 +08:00
Demon000
e69f792ee8 raphael: light: Avoid resetting state
The handler function is called regardless of whether the value of the
highest priority state changed.
In case of the notification led, this translates to the breathing
process being reset, which triggers my OCD.

Change-Id: I4880b00602cbb739219871f1d7ce9ad85d87bc1b
2021-07-27 21:10:06 +08:00
Demon000
5e33d17ff3 raphael: light: Avoid uint32_t underflow
Change-Id: If4f9360cc301ee8ba9f432dbbe3379c2c634c574
2021-07-27 21:10:06 +08:00
Demon000
e4b713b8de raphael: light: Properly scale brightness range
Change-Id: I0c7b9d2644bbc67a1d404e60bbb2fcc7d8a305ec
2021-07-27 21:10:06 +08:00
Demon000
8eb666613c raphael: Import lights HAL from Xiaomi msm8998-common
Change-Id: Ieee4277f15927b4522deaec9a709809cf6db6fea
2021-07-27 21:10:06 +08:00