some fixes
This commit is contained in:
@@ -126,6 +126,27 @@ class SwitchModel:
|
||||
invert_logic: bool = False
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class ControlButtonModel:
|
||||
"""Physical GPIO push-button that triggers a runtime action on press.
|
||||
|
||||
Default wiring: the button sits between the GPIO line and GND with the
|
||||
internal pull-up enabled, so the line idles high and a press drives it low
|
||||
(``active_low``). The watcher reacts to the press edge only, so one push
|
||||
yields one action. Disabled by default so non-Pi hosts never touch GPIO.
|
||||
"""
|
||||
|
||||
ACTION_CAPTURE_TMP_REFERENCE = "capture_tmp_reference"
|
||||
|
||||
enabled: bool = False
|
||||
gpio_chip: str = "/dev/gpiochip0"
|
||||
pin: int = -1
|
||||
active_low: bool = True
|
||||
bias: str = ""
|
||||
debounce_ms: int = 50
|
||||
action: str = ACTION_CAPTURE_TMP_REFERENCE
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class RingEndpointModel:
|
||||
"""Shared-memory ring endpoint description."""
|
||||
@@ -266,6 +287,7 @@ class RunConfigModel:
|
||||
preprocess: PreprocessModel = field(default_factory=PreprocessModel)
|
||||
gpr: GprModel = field(default_factory=GprModel)
|
||||
combos: list[ComboModel] = field(default_factory=list)
|
||||
control_button: ControlButtonModel = field(default_factory=ControlButtonModel)
|
||||
|
||||
LIBREVNA_MODEL = "librevna"
|
||||
LIBREVNA_MULTI_MODEL = "librevna_multi"
|
||||
|
||||
Reference in New Issue
Block a user