Fix settings persistence, streaming stability, and UI polish

- Fix device settings partial update using model_fields_set for true merge
- Add missing interpolation_mode and smoothing to all API responses
- Fix send_pixels race condition when wled_client is None during stop
- Allow LED segments to exceed edge pixel count (float stepping)
- Fix modal scroll lock using position:fixed to prevent layout shift
- Show loading state for brightness slider until real value is fetched
- Remove stream description from stream selector dialog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 02:59:34 +03:00
parent aa02a5f372
commit 66eecdb3c9
5 changed files with 58 additions and 28 deletions

View File

@@ -613,6 +613,8 @@ class ProcessorManager:
)
# Send to WLED with device brightness
if not state.is_running or state.wled_client is None:
break
brightness_value = int(wled_brightness * 255)
await state.wled_client.send_pixels(led_colors, brightness=brightness_value)

View File

@@ -229,18 +229,16 @@ def get_edge_segments(
divide_axis = 0 # Height
edge_length = edge_pixels.shape[0]
if segment_count > edge_length:
raise ValueError(
f"segment_count {segment_count} is larger than edge length {edge_length}"
)
# Calculate segment size
segment_size = edge_length // segment_count
# Use float stepping so multiple LEDs can share pixels when
# segment_count > edge_length (e.g. after downscaling).
step = edge_length / segment_count
segments = []
for i in range(segment_count):
start = i * segment_size
end = start + segment_size if i < segment_count - 1 else edge_length
start = int(i * step)
end = max(start + 1, int((i + 1) * step))
# Clamp to edge bounds
end = min(end, edge_length)
if divide_axis == 1:
segment = edge_pixels[:, start:end, :]