mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
AutoFrontlight plugin (#2941)
* Add AutoFrontlight plugin * Add configuration to control autofrontlight feature
This commit is contained in:
@@ -43,10 +43,8 @@ local footerTextGeneratorMap = {
|
||||
frontlight = function()
|
||||
if not Device:hasFrontlight() then return "L: NA" end
|
||||
local powerd = Device:getPowerDevice()
|
||||
if powerd.is_fl_on ~= nil and powerd.is_fl_on == true then
|
||||
if powerd.fl_intensity ~= nil then
|
||||
return ("L: %d%%"):format(powerd.fl_intensity)
|
||||
end
|
||||
if powerd:isFrontlightOn() then
|
||||
return ("L: %d%%"):format(powerd:frontlightIntensity())
|
||||
else
|
||||
return "L: Off"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user