fix: DDP frames respect the max brightness ceiling

DDP frames still skip the device and master brightness, since the sender
sets the colours, but they are now scaled by max_brightness instead of
being shown at a fixed full 255.

ddp_test expects the same scale.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Haiku 5.5 committed 2026-11-12 11:12:15 +13:00
1 parent 59eb37cad5
commit 94e300f6ad
2 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -732,7 +732,8 @@ def run_all(hosts, serial_port, broadcast):
before, scale = {}, {}
for h in hosts:
before[h] = get(h, "/api/ddp")
scale[h] = 255 # DDP frames are shown at full brightness, whatever the device's brightness settings
# DDP frames ignore the device and master brightness, but the max brightness ceiling still applies
scale[h] = get(h, "/api/hardware")["max_brightness"]
out[h].append(f"before: active={before[h]['active']} packets={before[h]['packets']}")
out[h].append(f"output scale: {scale[h]}/255")