Polymorphism Phase 2 + remove unused gamma/saturation fields
ProcessorManager: replace all isinstance checks with property-based dispatch via base TargetProcessor (device_id, led_client, get_display_index, update_device, update_calibration). Remove gamma/saturation from ProcessingSettings, ColorCorrection schema, serialization, and migration — these were never used in the processing pipeline and are handled by postprocessing template filters. Delete dead apply_color_correction() function. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,6 @@ from .devices import (
|
||||
DeviceUpdate,
|
||||
)
|
||||
from .picture_targets import (
|
||||
ColorCorrection,
|
||||
PictureTargetCreate,
|
||||
PictureTargetListResponse,
|
||||
PictureTargetResponse,
|
||||
@@ -90,7 +89,6 @@ __all__ = [
|
||||
"DeviceResponse",
|
||||
"DeviceStateResponse",
|
||||
"DeviceUpdate",
|
||||
"ColorCorrection",
|
||||
"PictureTargetCreate",
|
||||
"PictureTargetListResponse",
|
||||
"PictureTargetResponse",
|
||||
|
||||
@@ -8,14 +8,6 @@ from pydantic import BaseModel, Field
|
||||
from wled_controller.core.processing.processing_settings import DEFAULT_STATE_CHECK_INTERVAL
|
||||
|
||||
|
||||
class ColorCorrection(BaseModel):
|
||||
"""Color correction settings."""
|
||||
|
||||
gamma: float = Field(default=2.2, description="Gamma correction", ge=0.1, le=5.0)
|
||||
saturation: float = Field(default=1.0, description="Saturation multiplier", ge=0.0, le=2.0)
|
||||
brightness: float = Field(default=1.0, description="Brightness multiplier", ge=0.0, le=1.0)
|
||||
|
||||
|
||||
class ProcessingSettings(BaseModel):
|
||||
"""Processing settings for a picture target."""
|
||||
|
||||
@@ -29,10 +21,6 @@ class ProcessingSettings(BaseModel):
|
||||
default=DEFAULT_STATE_CHECK_INTERVAL, ge=5, le=600,
|
||||
description="Seconds between WLED health checks"
|
||||
)
|
||||
color_correction: Optional[ColorCorrection] = Field(
|
||||
default_factory=ColorCorrection,
|
||||
description="Color correction settings"
|
||||
)
|
||||
|
||||
|
||||
class KeyColorRectangleSchema(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user