-
released this
2026-08-05 14:48:08 +01:00 | 35 commits to main since this release- Fixed a real, high-impact bug:
Brightness(the master dimmer
channel) was never being applied to any other channel at all.
Confirmed directly from raw smali (LightPrimitive.flatten(), called
on both bracketing schedule points ingetIntensitiesAtTime()before
interpolating between them -- JADX's decompiled Java for this class
carried its own "Code duplicated" warning, the same signal that led to
finding theis_night_segment()bug, so this was re-verified against
bytecode rather than trusted from the decompile a second time). Every
channel -- moonlight included -- was being interpolated and returned
without ever being scaled byBrightness, found via real hardware
testing: a light showing ~1% in the app's own display came back as
~25% from this library at the same moment, withBrightnessitself
reading ~3.3% at that point in its own ramp -- fully consistent with
the missing multiplication, not a lunar or scheduling bug.
interpolate_light_schedule()now flattens each bracketing point
SEPARATELY (by that point's ownBrightnessvalue) BEFORE
interpolating between the two already-flattened points -- confirmed
via a dedicated test that this is NOT mathematically equivalent to
interpolating raw values first and multiplying by a single
interpolatedBrightnessat the end, wheneverBrightnessitself
changes across the segment (which it usually does, e.g. ramping
during dusk/dawn).Brightnessitself is still returned as the plain
raw interpolated value, not flattened to a constant 100% the way the
realflatten()does to the primitive it's applied to -- callers
(e.g. a dedicatedBrightnesssensor) want the actual current
master-dimmer level. 4 new tests.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
0 downloads
- Fixed a real, high-impact bug: