diff --git a/aidocs/CONFIGURATION.md b/aidocs/CONFIGURATION.md index 1520000..f318117 100644 --- a/aidocs/CONFIGURATION.md +++ b/aidocs/CONFIGURATION.md @@ -122,6 +122,12 @@ Notes: - `mode` (`string`, default: `"auto"`): `"auto"` enables hardware AGC (falls back to `"manual"` with a warning if the device does not support it); `"manual"` uses the fixed `value`. - `value` (`f64`, default: `30.0`): Gain in dB. Used only when `mode = "manual"`. +### `[sdr.squelch]` +- `enabled` (`bool`, default: `false`): Enables virtual software squelch for demodulated audio except WFM on the primary SDR channel. +- `threshold_db` (`f32`, default: `-65.0`, valid: `-140..=0`): Open threshold in dBFS. +- `hysteresis_db` (`f32`, default: `3.0`, valid: `0..=40`): Close hysteresis in dB. +- `tail_ms` (`u32`, default: `180`, valid: `0..=10000`): Tail hold time after signal drops below threshold. + ### `[[sdr.channels]]` Defines one virtual receiver channel within the wideband IQ stream. At least one channel is required when using the `soapysdr` backend. The **first** channel in the list is the *primary* channel: `set_freq` and `set_mode` from rig control apply to it, and `get_status` reads from it. diff --git a/aidocs/SDR.md b/aidocs/SDR.md index 3451ae1..baa883c 100644 --- a/aidocs/SDR.md +++ b/aidocs/SDR.md @@ -224,6 +224,18 @@ value = 30.0 # dB; ignored when mode = "auto" Advanced per-element gain is out of scope for this phase (no `lna`/`vga`/`if` sub-keys initially). +### 4.1 Virtual Squelch + +Software squelch is configured globally under `[sdr.squelch]` and currently applies to the primary channel's demodulated audio path except WFM. + +```toml +[sdr.squelch] +enabled = false +threshold_db = -65.0 # dBFS open threshold +hysteresis_db = 3.0 # dB close hysteresis +tail_ms = 180 # hold time after signal drops +``` + --- ## 5. Filter Configuration @@ -311,6 +323,12 @@ center_offset_hz = 200000 # SDR tunes this many Hz below dial frequency mode = "auto" value = 30.0 # Effective only when mode = "manual" +[sdr.squelch] +enabled = false +threshold_db = -65.0 +hysteresis_db = 3.0 +tail_ms = 180 + [[sdr.channels]] id = "primary" offset_hz = 0 diff --git a/trx-rs.toml.example b/trx-rs.toml.example index feaecaf..9997a40 100644 --- a/trx-rs.toml.example +++ b/trx-rs.toml.example @@ -128,6 +128,12 @@ wspr_file = "TRXRS-WSPR-%YYYY%-%MM%-%DD%.log" # mode = "auto" # value = 30.0 # +# [trx-server.sdr.squelch] +# enabled = false +# threshold_db = -65.0 +# hysteresis_db = 3.0 +# tail_ms = 180 +# # [[trx-server.sdr.channels]] # id = "primary" # offset_hz = 0