Frans de Jonge 6 years ago committed by GitHub
parent 8b3b2b0eb1
commit 68e63df442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,6 +109,12 @@ local KoboSnow = Kobo:new{
display_dpi = 265,
-- the bezel covers the top 11 pixels:
viewport = Geom:new{x=0, y=11, w=1080, h=1429},
hasNaturalLight = yes,
frontlight_settings = {
frontlight_white = "/sys/class/backlight/lm3630a_ledb",
frontlight_red = "/sys/class/backlight/lm3630a_led",
frontlight_green = "/sys/class/backlight/lm3630a_leda",
},
}
-- Kobo Aura second edition:

@ -97,7 +97,7 @@ function KoboPowerD:init()
-- If this device has natural light (currently only KA1)
-- use the SysFS interface, and ioctl otherwise.
if self.device.hasNaturalLight() then
self.fl = SysfsLight
self.fl = SysfsLight:new(self.device.frontlight_settings)
self.fl_warmth = 0
self:_syncKoboLightOnStart()
else

@ -19,6 +19,14 @@ local KoboSysfsLight = {
green_offset = -65,
}
function KoboSysfsLight:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
if o.init then o:init() end
return o
end
function KoboSysfsLight:setBrightness(brightness)
self:setNaturalBrightness(brightness, self.current_warmth)
end

Loading…
Cancel
Save