[fix](trx-rs): keep SDR center frequency stable in-band

Signed-off-by: Stan Grams <sjg@haxx.space>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
2026-02-27 22:48:12 +01:00
parent 07ad26b54a
commit 54fb107d3b
12 changed files with 130 additions and 16 deletions
+1
View File
@@ -10,6 +10,7 @@ use crate::RigMode;
pub enum RigCommand {
GetSnapshot,
SetFreq(Freq),
SetCenterFreq(Freq),
SetMode(RigMode),
SetPtt(bool),
PowerOn,
@@ -491,6 +491,7 @@ pub fn command_from_rig_command(cmd: RigCommand) -> Box<dyn RigCommandHandler> {
match cmd {
RigCommand::GetSnapshot => Box::new(GetSnapshotCommand),
RigCommand::SetFreq(freq) => Box::new(SetFreqCommand::new(freq)),
RigCommand::SetCenterFreq(_) => Box::new(GetSnapshotCommand),
RigCommand::SetMode(mode) => Box::new(SetModeCommand::new(mode)),
RigCommand::SetPtt(ptt) => Box::new(SetPttCommand::new(ptt)),
RigCommand::PowerOn => Box::new(PowerOnCommand),
+10
View File
@@ -88,6 +88,16 @@ pub trait RigCat: Rig + Send {
freq: Freq,
) -> Pin<Box<dyn Future<Output = DynResult<()>> + Send + 'a>>;
fn set_center_freq<'a>(
&'a mut self,
_freq: Freq,
) -> Pin<Box<dyn Future<Output = DynResult<()>> + Send + 'a>> {
Box::pin(std::future::ready(Err(
Box::new(response::RigError::not_supported("set_center_freq"))
as Box<dyn std::error::Error + Send + Sync>,
)))
}
fn set_mode<'a>(
&'a mut self,
mode: RigMode,