"""Local editable config for ``librevna_generator_sweep.py``."""

from __future__ import annotations

from python_app.generator_sweep.config import GeneratorSweepConfig


CONFIG = GeneratorSweepConfig(
    log_level="INFO",  # DEBUG, INFO, WARNING, ERROR, or CRITICAL.
    serial=None,  # None or exact serial string, for example "206930A15532".
    strict_protocol_version=14,  # Exact value for the connected device: 14.
    start_hz=100_000_000.0,  # Script constraint: > 0. Device reports frequency range 0.0 .. 6_000_000_000.0 Hz.
    stop_hz=6_000_000_000.0,  # Script constraint: >= start_hz. Device reports frequency range 0.0 .. 6_000_000_000.0 Hz.
    step_hz=0,  # > 0 to use step mode, or 0 to disable and use points mode.
    points=501,  # 0 to disable, or >= 2 to use points mode; if start_hz == stop_hz then only 1 is allowed.
    hold_time_ms=50.0,  # >= 0 ms. Float values like 0.5 are allowed.
    loop=True,  # True or False.
    port=1,  # Only 1 or 2.
    power_dbm=-10.0,  # Device reports source power range -40.0 .. 0.0 dBm.
    amplitude_correction=False,  # True = apply source amplitude calibration, False = use raw generator level.
    settle_timeout_ms=1_000,  # > 0 ms.
    status_poll_ms=10.0,  # > 0 ms. Float values like 0.2 are allowed.
    post_lock_delay_us=0,  # >= 0 us.
    gpio_chip="/dev/gpiochip0",  # Non-empty Linux GPIO chip path.
    sweep_start_pin=5,  # BCM GPIO, >= 0, must differ from curr_step_pin and pwm_pin.
    curr_step_pin=6,  # BCM GPIO, >= 0, must differ from sweep_start_pin and pwm_pin.
    curr_step_initial_level=0,  # Only 0 or 1.
    pwm_pin=12,  # Only 12, 13, 18, or 19 on Raspberry Pi 5.
    pwm_frequency_hz=2_000_000,  # > 0 Hz.
    pwm_duty_cycle=0.5,  # Range: 0.0 < value <= 1.0.
)
