From 9ceb07a4c667a275a3401fc202a0c5bd3b54f75d Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Fri, 28 Jul 2023 20:48:28 +0200 Subject: [PATCH] Kobo: Unbreak Aura One support (#10758) Regression since #10728, Fix #10757 --- frontend/device/kobo/device.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/device/kobo/device.lua b/frontend/device/kobo/device.lua index aafb0edc5..f7353b54b 100644 --- a/frontend/device/kobo/device.lua +++ b/frontend/device/kobo/device.lua @@ -634,14 +634,6 @@ function Kobo:init() end end - -- NOTE: Devices with an AW99703 frontlight PWM controller feature a hardware smooth ramp when setting the frontlight intensity. - --- A side-effect of this behavior is that if you queue a series of intensity changes ending at 0, - --- it won't ramp *at all*, jumping straight to zero instead. - --- So we delay the final ramp off step to prevent (both) the native and our ramping from being optimized out. - if self:hasNaturalLight() and self.frontlight_settings.frontlight_mixer:find("aw99703", 12, true) then - self.frontlight_settings.ramp_off_delay = 0.5 - end - -- NOTE: i.MX5 devices have a wonky RTC that doesn't like alarms set further away that UINT16_MAX seconds from now... -- (c.f., WakeupMgr for more details). -- NOTE: getRTCName is currently hardcoded to rtc0 (which is also WakeupMgr's default). @@ -680,6 +672,14 @@ function Kobo:init() self.canHWDither = yes end + -- NOTE: Devices with an AW99703 frontlight PWM controller feature a hardware smooth ramp when setting the frontlight intensity. + --- A side-effect of this behavior is that if you queue a series of intensity changes ending at 0, + --- it won't ramp *at all*, jumping straight to zero instead. + --- So we delay the final ramp off step to prevent (both) the native and our ramping from being optimized out. + if self:hasNaturalLightMixer() and self.frontlight_settings.frontlight_mixer:find("aw99703", 12, true) then + self.frontlight_settings.ramp_off_delay = 0.5 + end + self.powerd = require("device/kobo/powerd"):new{ device = self, battery_sysfs = self.battery_sysfs,