Compare commits
1
Commits
59eb37cad5
...
94e300f6ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94e300f6ad |
No files matched your search
+3
-3
@@ -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;
|
||||
|
||||
+2
-1
@@ -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")
|
||||
|
||||
|
||||
Reference in new issue
Block a user