feat: pre-flash configurable avant fin countdown
🚀 Deploy — JH Photomaton / 🔍 Vérification (push) Has been cancelled
🚀 Deploy — JH Photomaton / 🍓 Deploy sur le Pi (push) Has been cancelled

This commit is contained in:
2026-07-20 23:29:55 +02:00
parent b2ee41c367
commit 69b9cd0901
3 changed files with 35 additions and 6 deletions
+4
View File
@@ -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: