Extracts color processing and calibration out of WledPictureTarget into a new PictureColorStripSource entity, enabling multiple LED targets to share one capture/processing pipeline. New entities & processing: - storage/color_strip_source.py: ColorStripSource + PictureColorStripSource models - storage/color_strip_store.py: JSON-backed CRUD store (prefix css_) - core/processing/color_strip_stream.py: ColorStripStream ABC + PictureColorStripStream (runs border-extract → map → smooth → brightness/sat/gamma in background thread) - core/processing/color_strip_stream_manager.py: ref-counted shared stream manager Modified storage/processing: - WledPictureTarget simplified to device_id + color_strip_source_id + standby_interval + state_check_interval - Device model: calibration field removed - WledTargetProcessor: acquires ColorStripStream from manager instead of running its own pipeline - ProcessorManager: wires ColorStripStreamManager into TargetContext API layer: - New routes: GET/POST/PUT/DELETE /api/v1/color-strip-sources, PUT calibration/test - Removed calibration endpoints from /devices - Updated /picture-targets CRUD for new target structure Frontend: - New color-strips.js module with CSS editor modal and card rendering - Calibration modal extended with CSS mode (css-id hidden field + device picker) - targets.js: Color Strip Sources section added to LED tab; target editor/card updated - app.js: imports and window globals for CSS + showCSSCalibration - en.json / ru.json: color_strip.* and targets.section.color_strips keys added Data migration runs at startup: existing WledPictureTargets are converted to reference a new PictureColorStripSource created from their old settings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
"""API routes and schemas."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from .routes.system import router as system_router
|
|
from .routes.devices import router as devices_router
|
|
from .routes.templates import router as templates_router
|
|
from .routes.postprocessing import router as postprocessing_router
|
|
from .routes.picture_sources import router as picture_sources_router
|
|
from .routes.pattern_templates import router as pattern_templates_router
|
|
from .routes.picture_targets import router as picture_targets_router
|
|
from .routes.color_strip_sources import router as color_strip_sources_router
|
|
from .routes.profiles import router as profiles_router
|
|
|
|
router = APIRouter()
|
|
router.include_router(system_router)
|
|
router.include_router(devices_router)
|
|
router.include_router(templates_router)
|
|
router.include_router(postprocessing_router)
|
|
router.include_router(pattern_templates_router)
|
|
router.include_router(picture_sources_router)
|
|
router.include_router(color_strip_sources_router)
|
|
router.include_router(picture_targets_router)
|
|
router.include_router(profiles_router)
|
|
|
|
__all__ = ["router"]
|