diff --git a/frontend/device/cervantes/powerd.lua b/frontend/device/cervantes/powerd.lua index 90c7ecb1c..89fe3d1df 100644 --- a/frontend/device/cervantes/powerd.lua +++ b/frontend/device/cervantes/powerd.lua @@ -51,10 +51,13 @@ function CervantesPowerD:init() if self.device:hasNaturalLight() then local nl_config = G_reader_settings:readSetting("natural_light_config") if nl_config then - for key,val in pairs(nl_config) do + for key, val in pairs(nl_config) do self.device.frontlight_settings[key] = val end end + -- Does this device's NaturalLight use a custom scale? + self.fl_warmth_min = self.device.frontlight_settings.nl_min or self.fl_warmth_min + self.fl_warmth_max = self.device.frontlight_settings.nl_max or self.fl_warmth_max -- If this device has a mixer, we can use the ioctl for brightness control, as it's much lower latency. if self.device:hasNaturalLightMixer() then local kobolight = require("ffi/kobolight") diff --git a/frontend/device/kobo/powerd.lua b/frontend/device/kobo/powerd.lua index ab0cb0fd0..b5a92e2f4 100644 --- a/frontend/device/kobo/powerd.lua +++ b/frontend/device/kobo/powerd.lua @@ -139,8 +139,7 @@ function KoboPowerD:init() --- @note: Newer devices appear to block slightly longer on FL ioctls/sysfs, so we only really need a delay on older devices. self.device.frontlight_settings.ramp_delay = self.device.frontlight_settings.ramp_delay or (self.device:hasNaturalLight() and 0.0 or 0.025) - -- If this device has natural light (currently only KA1 & Forma) - -- Use the SysFS interface, and ioctl otherwise. + -- If this device has natural light, use the sysfs interface, and ioctl otherwise. -- NOTE: On the Forma, nickel still appears to prefer using ntx_io to handle the FL, -- but it does use sysfs for the NL... if self.device:hasNaturalLight() then