[chore](trx-server): remove temporary hang tracing

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-13 13:50:41 +01:00
parent 47f57aa10d
commit 7fde0f7730
4 changed files with 2 additions and 188 deletions
@@ -21,6 +21,7 @@ use std::time::{Duration, Instant};
use num_complex::Complex;
use tokio::sync::broadcast;
use tracing::warn;
use trx_core::rig::state::RigMode;
pub use self::channel::{ChannelDsp, VirtualSquelchConfig};
@@ -288,39 +289,12 @@ fn iq_read_loop(
let mut zero_read_streak: u32 = 0;
let mut overflow_log_window_start: Option<Instant> = None;
let mut overflow_log_suppressed: u32 = 0;
let mut retune_seq: u64 = 0;
let mut last_applied_retune_hz: Option<f64> = None;
loop {
// Apply any pending hardware retune before the next read.
if let Ok(mut cmd) = retune_cmd.try_lock() {
if let Some(hz) = cmd.take() {
retune_seq = retune_seq.wrapping_add(1);
let started = Instant::now();
tracing::warn!(
"SDR retune request #{} starting: target={:.0} Hz, last_applied={}",
retune_seq,
hz,
last_applied_retune_hz
.map(|value| format!("{value:.0} Hz"))
.unwrap_or_else(|| "none".to_string())
);
if let Err(e) = source.set_center_freq(hz) {
tracing::warn!(
"SDR retune request #{} failed after {:?}: target={:.0} Hz: {}",
retune_seq,
started.elapsed(),
hz,
e
);
} else {
last_applied_retune_hz = Some(hz);
tracing::info!(
"SDR retune request #{} applied in {:?}: {:.0} Hz",
retune_seq,
started.elapsed(),
hz
);
warn!("set_center_freq failed ({}): {}", hz, e);
}
}
}
@@ -10,8 +10,6 @@ pub mod vchan_impl;
use std::pin::Pin;
use std::sync::atomic::Ordering;
use std::sync::{Arc, Mutex};
use std::time::Instant;
use trx_core::radio::freq::{Band, Freq};
use trx_core::rig::response::RigError;
use trx_core::rig::state::{RigFilterState, SpectrumData, VchanRdsEntry, WfmDenoiseLevel};
@@ -452,13 +450,6 @@ impl RigCat for SoapySdrRig {
freq: Freq,
) -> Pin<Box<dyn std::future::Future<Output = DynResult<()>> + Send + 'a>> {
Box::pin(async move {
let started = Instant::now();
tracing::info!(
"SoapySdrRig::set_freq start: target={} Hz, current_center={} Hz, mode={:?}",
freq.hz,
self.center_hz,
self.mode
);
tracing::debug!("SoapySdrRig: set_freq -> {} Hz", freq.hz);
let freq_changed = self.freq.hz != freq.hz;
self.freq = freq;
@@ -496,12 +487,6 @@ impl RigCat for SoapySdrRig {
}
}
self.update_ais_channel_offsets();
tracing::info!(
"SoapySdrRig::set_freq done in {:?}: dial={} Hz, center={} Hz",
started.elapsed(),
self.freq.hz,
self.center_hz
);
Ok(())
})
}
@@ -511,12 +496,6 @@ impl RigCat for SoapySdrRig {
freq: Freq,
) -> Pin<Box<dyn std::future::Future<Output = DynResult<()>> + Send + 'a>> {
Box::pin(async move {
let started = Instant::now();
tracing::info!(
"SoapySdrRig::set_center_freq start: target={} Hz, current_center={} Hz",
freq.hz,
self.center_hz
);
tracing::debug!("SoapySdrRig: set_center_freq -> {} Hz", freq.hz);
self.center_hz = freq.hz as i64;
if let Ok(mut cmd) = self.retune_cmd.lock() {
@@ -531,11 +510,6 @@ impl RigCat for SoapySdrRig {
}
}
self.update_ais_channel_offsets();
tracing::info!(
"SoapySdrRig::set_center_freq done in {:?}: center={} Hz",
started.elapsed(),
self.center_hz
);
Ok(())
})
}
@@ -545,12 +519,6 @@ impl RigCat for SoapySdrRig {
mode: RigMode,
) -> Pin<Box<dyn std::future::Future<Output = DynResult<()>> + Send + 'a>> {
Box::pin(async move {
let started = Instant::now();
tracing::info!(
"SoapySdrRig::set_mode start: target={:?}, current={:?}",
mode,
self.mode
);
tracing::debug!("SoapySdrRig: set_mode -> {:?}", mode);
self.mode = mode.clone();
self.bandwidth_hz = Self::default_bandwidth_for_mode(&mode);
@@ -565,12 +533,6 @@ impl RigCat for SoapySdrRig {
}
self.apply_ais_channel_activity();
self.apply_ais_channel_filters();
tracing::info!(
"SoapySdrRig::set_mode done in {:?}: mode={:?}, bandwidth_hz={}",
started.elapsed(),
self.mode,
self.bandwidth_hz
);
Ok(())
})
}