diff --git a/src/decoders/trx-ftx/src/ft2/bitmetrics.rs b/src/decoders/trx-ftx/src/bitmetrics.rs similarity index 99% rename from src/decoders/trx-ftx/src/ft2/bitmetrics.rs rename to src/decoders/trx-ftx/src/bitmetrics.rs index f363e5f..537af0c 100644 --- a/src/decoders/trx-ftx/src/ft2/bitmetrics.rs +++ b/src/decoders/trx-ftx/src/bitmetrics.rs @@ -13,7 +13,7 @@ use rustfft::FftPlanner; use crate::constants::{FT4_COSTAS_PATTERN, FT4_GRAY_MAP}; -use super::{FT2_FRAME_SYMBOLS, FT2_NSS}; +use crate::ft2::{FT2_FRAME_SYMBOLS, FT2_NSS}; const N_METRICS: usize = 2 * FT2_FRAME_SYMBOLS; diff --git a/src/decoders/trx-ftx/src/ft2/downsample.rs b/src/decoders/trx-ftx/src/downsample.rs similarity index 99% rename from src/decoders/trx-ftx/src/ft2/downsample.rs rename to src/decoders/trx-ftx/src/downsample.rs index e92a528..b4fd784 100644 --- a/src/decoders/trx-ftx/src/ft2/downsample.rs +++ b/src/decoders/trx-ftx/src/downsample.rs @@ -14,7 +14,7 @@ use std::sync::Arc; use num_complex::Complex32; use rustfft::FftPlanner; -use super::{FT2_NDOWN, FT2_SYMBOL_PERIOD_F}; +use crate::ft2::{FT2_NDOWN, FT2_SYMBOL_PERIOD_F}; /// Reusable scratch buffers for frequency-domain downsampling. pub struct DownsampleWorkspace { diff --git a/src/decoders/trx-ftx/src/ft2/mod.rs b/src/decoders/trx-ftx/src/ft2.rs similarity index 98% rename from src/decoders/trx-ftx/src/ft2/mod.rs rename to src/decoders/trx-ftx/src/ft2.rs index 615c09c..c0227ed 100644 --- a/src/decoders/trx-ftx/src/ft2/mod.rs +++ b/src/decoders/trx-ftx/src/ft2.rs @@ -8,24 +8,18 @@ //! peaks in the averaged spectrum, downsample each candidate, compute 2D sync //! scores, extract bit metrics, and run multi-pass LDPC + OSD decode. -pub mod bitmetrics; -pub mod downsample; -pub mod osd; -pub mod sync; - use std::sync::Arc; use num_complex::Complex32; use realfft::RealFftPlanner; use rustfft::FftPlanner; +use crate::bitmetrics::BitMetricsWorkspace; use crate::decode::{verify_crc_and_build_message, FtxMessage}; +use crate::downsample::{DownsampleContext, DownsampleWorkspace}; +use crate::ft2_sync::{prepare_sync_waveforms, sync2d_score, SyncWaveforms}; use crate::protocol::*; -use bitmetrics::BitMetricsWorkspace; -use downsample::{DownsampleContext, DownsampleWorkspace}; -use sync::{prepare_sync_waveforms, sync2d_score, SyncWaveforms}; - // FT2 DSP constants pub const FT2_NDOWN: usize = 9; pub const FT2_NFFT1: usize = 1152; @@ -655,7 +649,7 @@ impl Ft2Pipeline { let mut nharderror = -1i32; let mut dmin = 0.0f32; - osd::ft2_decode174_91_osd( + crate::osd::ft2_decode174_91_osd( &mut log174, FTX_LDPC_K, 4, diff --git a/src/decoders/trx-ftx/src/ft2/sync.rs b/src/decoders/trx-ftx/src/ft2_sync.rs similarity index 99% rename from src/decoders/trx-ftx/src/ft2/sync.rs rename to src/decoders/trx-ftx/src/ft2_sync.rs index a385ade..cb09ea5 100644 --- a/src/decoders/trx-ftx/src/ft2/sync.rs +++ b/src/decoders/trx-ftx/src/ft2_sync.rs @@ -13,7 +13,7 @@ use std::sync::OnceLock; use crate::constants::FT4_COSTAS_PATTERN; -use super::{FT2_NDOWN, FT2_NSS, FT2_SYMBOL_PERIOD_F, FT2_SYNC_TWEAK_MAX, FT2_SYNC_TWEAK_MIN}; +use crate::ft2::{FT2_NDOWN, FT2_NSS, FT2_SYMBOL_PERIOD_F, FT2_SYNC_TWEAK_MAX, FT2_SYNC_TWEAK_MIN}; /// Number of frequency tweak entries. const NUM_TWEAKS: usize = (FT2_SYNC_TWEAK_MAX - FT2_SYNC_TWEAK_MIN) as usize + 1; diff --git a/src/decoders/trx-ftx/src/lib.rs b/src/decoders/trx-ftx/src/lib.rs index 2b73119..9e2c8ba 100644 --- a/src/decoders/trx-ftx/src/lib.rs +++ b/src/decoders/trx-ftx/src/lib.rs @@ -2,6 +2,8 @@ // // SPDX-License-Identifier: BSD-2-Clause +#[allow(clippy::needless_range_loop)] +pub mod bitmetrics; pub mod callsign_hash; pub mod constants; pub mod crc; @@ -9,15 +11,21 @@ pub mod crc; pub mod decode; mod decoder; #[allow(clippy::needless_range_loop)] +pub mod downsample; +#[allow(clippy::needless_range_loop)] pub mod encode; #[allow(dead_code, clippy::needless_range_loop, clippy::too_many_arguments)] pub mod ft2; #[allow(clippy::needless_range_loop)] +pub mod ft2_sync; +#[allow(clippy::needless_range_loop)] pub mod ldpc; #[allow(clippy::explicit_counter_loop, clippy::needless_range_loop)] pub mod message; #[allow(dead_code)] pub mod monitor; +#[allow(dead_code, clippy::needless_range_loop, clippy::too_many_arguments)] +pub mod osd; pub mod protocol; pub mod text; diff --git a/src/decoders/trx-ftx/src/ft2/osd.rs b/src/decoders/trx-ftx/src/osd.rs similarity index 100% rename from src/decoders/trx-ftx/src/ft2/osd.rs rename to src/decoders/trx-ftx/src/osd.rs