CSS: add led_count field; calibration dialog improvements; color corrections collapsible section

- Add explicit led_count to PictureColorStripSource (0 = auto from calibration)
- Stream pads with black or truncates to match led_count exactly
- Calibration dialog: show led_count input above visual editor in CSS mode
- Calibration dialog: pre-populate led_count with effective count (cal sum) when stored value is 0
- Calibration dialog: sync preview label live as led_count input changes
- CSS editor: group brightness/saturation/gamma into collapsible "Color Corrections" section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 16:42:32 +03:00
parent 7de3546b14
commit a3aeafef13
14 changed files with 173 additions and 47 deletions

View File

@@ -51,6 +51,7 @@ def _css_to_response(source) -> ColorStripSourceResponse:
gamma=getattr(source, "gamma", None),
smoothing=getattr(source, "smoothing", None),
interpolation_mode=getattr(source, "interpolation_mode", None),
led_count=getattr(source, "led_count", 0),
calibration=calibration,
description=source.description,
created_at=source.created_at,
@@ -93,6 +94,7 @@ async def create_color_strip_source(
gamma=data.gamma,
smoothing=data.smoothing,
interpolation_mode=data.interpolation_mode,
led_count=data.led_count,
calibration=calibration,
description=data.description,
)
@@ -143,6 +145,7 @@ async def update_color_strip_source(
gamma=data.gamma,
smoothing=data.smoothing,
interpolation_mode=data.interpolation_mode,
led_count=data.led_count,
calibration=calibration,
description=data.description,
)