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...
This commit is contained in:
1 parent
770625d756
commit
f213fb6405
1 file changed
+1
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user