sweep feature added

This commit is contained in:
Ayzen
2026-10-09 19:45:30 +03:00
parent 62e0430668
commit a1386e2588
8 changed files with 241 additions and 6 deletions
+21 -1
View File
@@ -2,7 +2,7 @@
from dataclasses import dataclass, field
from datetime import datetime
from enum import IntFlag
from enum import IntEnum, IntFlag
from typing import Any
from .constants import (
@@ -119,6 +119,26 @@ class DeviceStatus:
}
class SweepTarget(IntEnum):
"""Output driven by a firmware staircase sweep."""
LASER2_CURRENT = 0
STM32_DAC = 1
@dataclass(frozen=True, slots=True)
class SweepSettings:
"""Firmware sweep: min..max in fixed steps, then a pause at min before repeating."""
target: SweepTarget
enabled: bool
min_code: int
max_code: int
step_code: int
step_period_us: int
pause_ms: int
@dataclass(slots=True)
class ProfileSaveRequest:
"""Rendered profile payload that should be persisted on the device SD card."""