diff --git a/main/patterns.cpp b/main/patterns.cpp index 9b0e22b..f80a26a 100644 --- a/main/patterns.cpp +++ b/main/patterns.cpp @@ -236,9 +236,9 @@ static bool within(uint32_t now, uint32_t stamp, uint32_t window_ms) // Show the shadow frame, crossfading from the previous frame while a fade runs static void output(uint32_t now, bool full_brightness) { - // device brightness x master scale, under the max brightness ceiling. DDP frames are shown at - // full brightness: the sender sets the colours. - int s_scale = full_brightness ? 255 : s_global * s_master / 255 * s_max_brightness / 255; + // Pattern output: device brightness x master scale, under the max brightness ceiling. DDP frames + // skip the device and master brightness (the sender sets the colours) but still respect the ceiling. + int s_scale = full_brightness ? s_max_brightness : s_global * s_master / 255 * s_max_brightness / 255; int k = -1; if (s_fading) { uint32_t el = now - s_fade_t0; diff --git a/tools/ddp_test.py b/tools/ddp_test.py index 53f8231..16bdc79 100644 --- a/tools/ddp_test.py +++ b/tools/ddp_test.py @@ -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")