[feat](trx-backend-soapysdr): add hardware AGC toggle and SDR settings UI row
Add hardware AGC on/off control for SoapySDR backend, wired through the full stack from RigCommand to the web UI: - RigCommand::SetSdrAgc(bool) + ClientCommand::SetSdrAgc in protocol - set_sdr_agc() on RigCat trait (not-supported default) - SoapySdrRig: agc_enabled field, set_sdr_agc() via pipeline agc_cmd, sdr_agc_enabled in filter_state(); removes the "not yet implemented" warning — gain_mode="auto" now properly enables hardware AGC via SoapySDR set_gain_mode() - IqSource::set_gain_mode() trait method; RealIqSource implements it - SdrPipeline: agc_cmd channel, read loop applies it each iteration - POST /set_sdr_agc endpoint in trx-frontend-http - New "SDR settings" full-row in index.html with Hardware AGC checkbox and RF Gain (moved out of WFM controls); row hidden when show_sdr_gain_control is false - app.js: AGC checkbox handler, disables RF gain input while AGC is on, syncs checkbox state from filter.sdr_agc_enabled Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -41,6 +41,7 @@ pub enum RigCommand {
|
||||
SetBandwidth(u32),
|
||||
SetFirTaps(u32),
|
||||
SetSdrGain(f64),
|
||||
SetSdrAgc(bool),
|
||||
SetSdrSquelch { enabled: bool, threshold_db: f64 },
|
||||
SetWfmDeemphasis(u32),
|
||||
SetWfmStereo(bool),
|
||||
|
||||
@@ -523,6 +523,7 @@ pub fn command_from_rig_command(cmd: RigCommand) -> Box<dyn RigCommandHandler> {
|
||||
| RigCommand::SetBandwidth(_)
|
||||
| RigCommand::SetFirTaps(_)
|
||||
| RigCommand::SetSdrGain(_)
|
||||
| RigCommand::SetSdrAgc(_)
|
||||
| RigCommand::SetSdrSquelch { .. }
|
||||
| RigCommand::SetWfmDeemphasis(_)
|
||||
| RigCommand::SetWfmStereo(_)
|
||||
|
||||
@@ -190,6 +190,16 @@ pub trait RigCat: Rig + Send {
|
||||
)))
|
||||
}
|
||||
|
||||
fn set_sdr_agc<'a>(
|
||||
&'a mut self,
|
||||
_enabled: bool,
|
||||
) -> Pin<Box<dyn Future<Output = DynResult<()>> + Send + 'a>> {
|
||||
Box::pin(std::future::ready(Err(
|
||||
Box::new(response::RigError::not_supported("set_sdr_agc"))
|
||||
as Box<dyn std::error::Error + Send + Sync>,
|
||||
)))
|
||||
}
|
||||
|
||||
fn set_sdr_squelch<'a>(
|
||||
&'a mut self,
|
||||
_enabled: bool,
|
||||
|
||||
@@ -313,6 +313,8 @@ pub struct RigFilterState {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub sdr_gain_db: Option<f64>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub sdr_agc_enabled: Option<bool>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub sdr_squelch_enabled: Option<bool>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub sdr_squelch_threshold_db: Option<f64>,
|
||||
|
||||
Reference in New Issue
Block a user