Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbreak FL widget on !NTX devices #4921

merged 5 commits into from Apr 15, 2019
Changes from 1 commit
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

Don't turn the FL on on resume if it was off on suspend

  • Loading branch information...
NiLuJe committed Apr 14, 2019
commit afee415cba5333e425646c381bb264982084959b
@@ -21,6 +21,7 @@ local KoboPowerD = BasePowerD:new{
fl_warmth = nil,
auto_warmth = false,
max_warmth_hour = 23,
fl_was_on = nil,

@@ -329,13 +330,17 @@ end
-- Turn off front light before suspend.
function KoboPowerD:beforeSuspend()
if self.fl == nil then return end
-- Remember the current frontlight state
self.fl_was_on = self:isFrontlightOn()
-- Turn off the frontlight

-- Restore front light state after resume.
function KoboPowerD:afterResume()
if self.fl == nil then return end
-- Don't bother if the light was already off on suspend
if not self.fl_was_on then return end
-- Update AutoWarmth state
if self.fl_warmth ~= nil and self.auto_warmth then
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.