mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Refactored to use strictly locals
This commit is contained in:
17
frontend/ui/device/basefrontlight.lua
Normal file
17
frontend/ui/device/basefrontlight.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local BaseFrontLight = {
|
||||
min = 1, max = 10,
|
||||
intensity = nil,
|
||||
}
|
||||
|
||||
function BaseFrontLight:init() end
|
||||
function BaseFrontLight:toggle() end
|
||||
function BaseFrontLight:setIntensityHW() end
|
||||
|
||||
function BaseFrontLight:setIntensity(intensity)
|
||||
intensity = intensity < self.min and self.min or intensity
|
||||
intensity = intensity > self.max and self.max or intensity
|
||||
self.intensity = intensity
|
||||
self:setIntensityHW()
|
||||
end
|
||||
|
||||
return BaseFrontLight
|
||||
Reference in New Issue
Block a user