Make sure the AutoWarmth feature will never try to turn the light back (#4953)

on if it's off.
Because, on the KA1, since wetting the warmth *has* to set the
brightness, it could ;).

Patch only actually needed on Kobo, as all Cervantes devices with warmth
support have a mixer, which mean they *can* set the warmth without
affecting the brightness ;).
pull/4955/head
NiLuJe 5 years ago committed by Frans de Jonge
parent 8f0a3dda7a
commit d9ab5d2f43

@ -240,7 +240,12 @@ function KoboPowerD:setWarmth(warmth)
self:calculateAutoWarmth()
end
self.fl_warmth = warmth or self.fl_warmth
self.fl:setWarmth(self.fl_warmth)
-- Don't turn the light back on on legacy NaturalLight devices just for the sake of setting the warmth!
-- That's because we can only set warmth independently of brightness on devices with a mixer.
-- On older ones, calling setWarmth *will* actually set the brightness, too!
if self.device:hasNaturalLightMixer() or self:isFrontlightOnHW() then
self.fl:setWarmth(self.fl_warmth)
end
end
-- Sets fl_warmth according to current hour and max_warmth_hour

Loading…
Cancel
Save