summaryrefslogtreecommitdiff
path: root/light
diff options
context:
space:
mode:
authorIsaac Chen <isaacchen@isaacchen.cn>2018-05-08 10:21:10 +0200
committerIsaac Chen <tingyi364@gmail.com>2019-09-01 16:44:11 +0200
commit88a553b9ad3d30695dd55fd72ed61ee033d024b5 (patch)
tree4568dd5624e411ab3555fefea65f2bde5b6ec236 /light
parent90ce7841f6b2822afbff1182e079b2af62a14946 (diff)
wayne-common: light: Set correct brightness for backlight
* Xiaomi switched to 4095 level brightness switch on P Signed-off-by: Isaac Chen <isaacchen@isaacchen.cn> Change-Id: If41820a046dd32697e21ca71defe2377895407c2
Diffstat (limited to 'light')
-rw-r--r--light/Light.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/light/Light.cpp b/light/Light.cpp
index 721e20a..d1981bb 100644
--- a/light/Light.cpp
+++ b/light/Light.cpp
@@ -88,6 +88,7 @@ static std::string getScaledRamp(uint32_t brightness) {
static void handleWayneBacklight(Type /*type*/, const LightState& state) {
uint32_t brightness = state.color & 0xFF;
+ brightness *= 16; // HACK
set(LCD_LED BRIGHTNESS, brightness);
}