• v0.3.1 8689f914bc

    v0.3.1
    Some checks failed
    Release / release (push) Failing after 3m42s
    Stable

    r3pek 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 in getIntensitiesAtTime() before
      interpolating between them -- JADX's decompiled Java for this class
      carried its own "Code duplicated" warning, the same signal that led to
      finding the is_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 by Brightness, 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, with Brightness itself
      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 own Brightness value) 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
      interpolated Brightness at the end, whenever Brightness itself
      changes across the segment (which it usually does, e.g. ramping
      during dusk/dawn). Brightness itself is still returned as the plain
      raw interpolated value, not flattened to a constant 100% the way the
      real flatten() does to the primitive it's applied to -- callers
      (e.g. a dedicated Brightness sensor) want the actual current
      master-dimmer level. 4 new tests.
    Downloads