From f213fb64051db442ea74bb54a39726cd8f2d8820 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Tue, 1 Mar 2016 20:11:05 +0100 Subject: [PATCH] Bypass flState on suspend/wakeup We pretty much always want to turn it off on suspend, and turn it on to some measure on wakeup. That, and nickel's FrontLightState is completely nonsensical on my device anyway... --- frontend/device/kobo/powerd.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/device/kobo/powerd.lua b/frontend/device/kobo/powerd.lua index dadefbcd9..59908d79f 100644 --- a/frontend/device/kobo/powerd.lua +++ b/frontend/device/kobo/powerd.lua @@ -63,7 +63,6 @@ end -- Turn off front light before suspend. function KoboPowerD:beforeSuspend() if self.fl ~= nil then - self.flState = true self.fl:setBrightness(0) end end @@ -73,7 +72,7 @@ function KoboPowerD:afterResume() if self.fl ~= nil then if KOBO_LIGHT_ON_START and tonumber(KOBO_LIGHT_ON_START) > -1 then self:setIntensity(math.min(KOBO_LIGHT_ON_START, 100)) - elseif self.flState then + else self.fl:setBrightness(self.flIntensity) end end