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...
pull/1863/head
NiLuJe 8 years ago
parent 770625d756
commit f213fb6405

@ -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

Loading…
Cancel
Save