diff --git a/src/handler/matrix_display.py b/src/handler/matrix_display.py index 1355661..b02be0d 100644 --- a/src/handler/matrix_display.py +++ b/src/handler/matrix_display.py @@ -68,9 +68,9 @@ class MatrixDisplay: with canvas(self.device) as draw: draw.rectangle((0, 0, 31, 7), outline="white", fill="white") - async def pattern(self, pattern: str = "0,1", step_ms: int = 500): + async def pattern(self, pattern: str = "01", step_ms: int = 500): # Parse - pattern_steps = [step.strip() == "1" for step in pattern.split(",") if step] + pattern_steps = [step.strip() == "1" for step in pattern] # Execute for step in pattern_steps: if step: diff --git a/src/main.py b/src/main.py index 1b7c9f4..13dbfe5 100644 --- a/src/main.py +++ b/src/main.py @@ -101,7 +101,7 @@ async def flash(count: int = 1, contrast: Optional[int] = None): @app.post("/pattern") -async def flash(pattern: str = "0,1", step_ms: int = 500): +async def flash(pattern: str = "01", step_ms: int = 500): await queue.set_idle_action(display_pattern, pattern=pattern, step_ms=step_ms) return {"message": "Activated pattern."}