[refactor](decoders): consolidate decoder crates under src/decoders/

Move trx-ft8 and trx-wspr into src/decoders/ alongside a new trx-aprs
crate that extracts the Bell 202/AX.25 decoder from trx-server, giving
all three modems a consistent crate-per-decoder layout.

- src/decoders/trx-ft8/  (moved from src/trx-ft8/)
- src/decoders/trx-wspr/ (moved from src/trx-wspr/)
- src/decoders/trx-aprs/ (new — Bell 202 AFSK + AX.25/APRS decoder)
- trx-ft8/build.rs: fix external/ft8_lib relative path after move
- trx-server: drop decode::aprs module, use trx_aprs::AprsDecoder
- AprsPacket stays in trx-core (mirrors Ft8Message / WsprMessage)
- Workspace Cargo.toml updated with new member paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 18:30:04 +01:00
parent 0d6a35a933
commit 3ebd185a7e
15 changed files with 29 additions and 8 deletions
Generated
+8
View File
@@ -2261,6 +2261,13 @@ dependencies = [
"tracing-subscriber",
]
[[package]]
name = "trx-aprs"
version = "0.1.0"
dependencies = [
"trx-core",
]
[[package]]
name = "trx-backend"
version = "0.1.0"
@@ -2415,6 +2422,7 @@ dependencies = [
"toml",
"tracing",
"trx-app",
"trx-aprs",
"trx-backend",
"trx-core",
"trx-ft8",
+3 -2
View File
@@ -4,8 +4,9 @@
[workspace]
members = [
"src/trx-ft8",
"src/trx-wspr",
"src/decoders/trx-aprs",
"src/decoders/trx-ft8",
"src/decoders/trx-wspr",
"src/trx-core",
"src/trx-protocol",
"src/trx-app",
+11
View File
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2026 Stanislaw Grams <stanislawgrams@gmail.com>
#
# SPDX-License-Identifier: BSD-2-Clause
[package]
name = "trx-aprs"
version = "0.1.0"
edition = "2021"
[dependencies]
trx-core = { path = "../../trx-core" }
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2025 Stanislaw Grams <stanislawgrams@gmail.com>
// SPDX-FileCopyrightText: 2026 Stanislaw Grams <stanislawgrams@gmail.com>
//
// SPDX-License-Identifier: BSD-2-Clause
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: BSD-2-Clause
fn main() {
let base = "../../external/ft8_lib";
let base = "../../../external/ft8_lib";
let mut build = cc::Build::new();
build
.include(base)
+3 -2
View File
@@ -24,6 +24,7 @@ opus = "0.3"
trx-app = { path = "../trx-app" }
trx-backend = { path = "trx-backend" }
trx-core = { path = "../trx-core" }
trx-ft8 = { path = "../trx-ft8" }
trx-wspr = { path = "../trx-wspr" }
trx-aprs = { path = "../decoders/trx-aprs" }
trx-ft8 = { path = "../decoders/trx-ft8" }
trx-wspr = { path = "../decoders/trx-wspr" }
trx-protocol = { path = "../trx-protocol" }
+2 -1
View File
@@ -22,6 +22,7 @@ use trx_core::audio::{
};
use trx_core::decode::{AprsPacket, DecodedMessage, Ft8Message, WsprMessage};
use trx_core::rig::state::{RigMode, RigState};
use trx_aprs::AprsDecoder;
use trx_ft8::Ft8Decoder;
use trx_wspr::WsprDecoder;
@@ -666,7 +667,7 @@ pub async fn run_aprs_decoder(
decode_logs: Option<Arc<DecoderLoggers>>,
) {
info!("APRS decoder started ({}Hz, {} ch)", sample_rate, channels);
let mut decoder = decode::aprs::AprsDecoder::new(sample_rate);
let mut decoder = AprsDecoder::new(sample_rate);
let mut was_active = false;
let mut last_reset_seq: u64 = 0;
let mut active = matches!(state_rx.borrow().status.mode, RigMode::PKT);
-1
View File
@@ -2,5 +2,4 @@
//
// SPDX-License-Identifier: BSD-2-Clause
pub mod aprs;
pub mod cw;