feat: pre-flash configurable avant fin countdown
This commit is contained in:
@@ -64,6 +64,8 @@ class LEDConfig:
|
||||
dma: int = 10
|
||||
strip_type: str = "WS2812"
|
||||
effects: dict = field(default_factory=dict)
|
||||
countdown_duration: float = 3.0 # Durée du countdown photobooth-app (secondes)
|
||||
pre_flash_advance: float = 0.5 # Démarrer le flash X sec avant la fin du countdown
|
||||
|
||||
def get_effect(self, name: str) -> LEDEffectConfig:
|
||||
raw = self.effects.get(name, {})
|
||||
@@ -151,6 +153,8 @@ class ConfigService:
|
||||
dma=led_raw.get("dma", 10),
|
||||
strip_type=led_raw.get("strip_type", "WS2812"),
|
||||
effects=led_raw.get("effects", {}),
|
||||
countdown_duration=led_raw.get("countdown_duration", 3.0),
|
||||
pre_flash_advance=led_raw.get("pre_flash_advance", 0.5),
|
||||
)
|
||||
|
||||
if "print" in raw:
|
||||
|
||||
Reference in New Issue
Block a user