aboutsummaryrefslogtreecommitdiff
path: root/light/Light.cpp
diff options
context:
space:
mode:
authorDavide Garberi <dade.garberi@gmail.com>2018-01-25 16:29:18 +0100
committerDavide Garberi <dade.garberi@gmail.com>2018-01-25 17:06:50 +0100
commit2b16dc16492872793436435a0d4d52e4ffbba579 (patch)
tree2218d208d983746e1420deeca653aa048406c4ac /light/Light.cpp
parente03f3220a3bb949ca5c11b78de3c6ce5228b0d19 (diff)
msm8996-common: light: Remove the button backlight feature
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'light/Light.cpp')
-rw-r--r--light/Light.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/light/Light.cpp b/light/Light.cpp
index a364f05..c59abb6 100644
--- a/light/Light.cpp
+++ b/light/Light.cpp
@@ -59,7 +59,6 @@ namespace V2_0 {
namespace implementation {
Light::Light(std::pair<std::ofstream, uint32_t>&& lcd_backlight,
- std::vector<std::ofstream>&& button_backlight,
std::ofstream&& red_led, std::ofstream&& green_led, std::ofstream&& blue_led,
std::ofstream&& red_duty_pcts, std::ofstream&& green_duty_pcts, std::ofstream&& blue_duty_pcts,
std::ofstream&& red_start_idx, std::ofstream&& green_start_idx, std::ofstream&& blue_start_idx,
@@ -69,7 +68,6 @@ Light::Light(std::pair<std::ofstream, uint32_t>&& lcd_backlight,
std::ofstream&& red_blink, std::ofstream&& green_blink, std::ofstream&& blue_blink,
std::ofstream&& rgb_blink)
: mLcdBacklight(std::move(lcd_backlight)),
- mButtonBacklight(std::move(button_backlight)),
mRedLed(std::move(red_led)),
mGreenLed(std::move(green_led)),
mBlueLed(std::move(blue_led)),
@@ -95,12 +93,10 @@ Light::Light(std::pair<std::ofstream, uint32_t>&& lcd_backlight,
auto attnFn(std::bind(&Light::setAttentionLight, this, std::placeholders::_1));
auto backlightFn(std::bind(&Light::setLcdBacklight, this, std::placeholders::_1));
auto batteryFn(std::bind(&Light::setBatteryLight, this, std::placeholders::_1));
- auto buttonsFn(std::bind(&Light::setButtonsBacklight, this, std::placeholders::_1));
auto notifFn(std::bind(&Light::setNotificationLight, this, std::placeholders::_1));
mLights.emplace(std::make_pair(Type::ATTENTION, attnFn));
mLights.emplace(std::make_pair(Type::BACKLIGHT, backlightFn));
mLights.emplace(std::make_pair(Type::BATTERY, batteryFn));
- mLights.emplace(std::make_pair(Type::BUTTONS, buttonsFn));
mLights.emplace(std::make_pair(Type::NOTIFICATIONS, notifFn));
}
@@ -151,16 +147,6 @@ void Light::setLcdBacklight(const LightState& state) {
mLcdBacklight.first << brightness << std::endl;
}
-void Light::setButtonsBacklight(const LightState& state) {
- std::lock_guard<std::mutex> lock(mLock);
-
- uint32_t brightness = rgbToBrightness(state);
-
- for (auto& button : mButtonBacklight) {
- button << brightness << std::endl;
- }
-}
-
void Light::setBatteryLight(const LightState& state) {
std::lock_guard<std::mutex> lock(mLock);
mBatteryState = state;