[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:
Generated
+8
@@ -2261,6 +2261,13 @@ dependencies = [
|
|||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "trx-aprs"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"trx-core",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "trx-backend"
|
name = "trx-backend"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@@ -2415,6 +2422,7 @@ dependencies = [
|
|||||||
"toml",
|
"toml",
|
||||||
"tracing",
|
"tracing",
|
||||||
"trx-app",
|
"trx-app",
|
||||||
|
"trx-aprs",
|
||||||
"trx-backend",
|
"trx-backend",
|
||||||
"trx-core",
|
"trx-core",
|
||||||
"trx-ft8",
|
"trx-ft8",
|
||||||
|
|||||||
+3
-2
@@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"src/trx-ft8",
|
"src/decoders/trx-aprs",
|
||||||
"src/trx-wspr",
|
"src/decoders/trx-ft8",
|
||||||
|
"src/decoders/trx-wspr",
|
||||||
"src/trx-core",
|
"src/trx-core",
|
||||||
"src/trx-protocol",
|
"src/trx-protocol",
|
||||||
"src/trx-app",
|
"src/trx-app",
|
||||||
|
|||||||
@@ -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
|
// SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: BSD-2-Clause
|
// SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let base = "../../external/ft8_lib";
|
let base = "../../../external/ft8_lib";
|
||||||
let mut build = cc::Build::new();
|
let mut build = cc::Build::new();
|
||||||
build
|
build
|
||||||
.include(base)
|
.include(base)
|
||||||
@@ -24,6 +24,7 @@ opus = "0.3"
|
|||||||
trx-app = { path = "../trx-app" }
|
trx-app = { path = "../trx-app" }
|
||||||
trx-backend = { path = "trx-backend" }
|
trx-backend = { path = "trx-backend" }
|
||||||
trx-core = { path = "../trx-core" }
|
trx-core = { path = "../trx-core" }
|
||||||
trx-ft8 = { path = "../trx-ft8" }
|
trx-aprs = { path = "../decoders/trx-aprs" }
|
||||||
trx-wspr = { path = "../trx-wspr" }
|
trx-ft8 = { path = "../decoders/trx-ft8" }
|
||||||
|
trx-wspr = { path = "../decoders/trx-wspr" }
|
||||||
trx-protocol = { path = "../trx-protocol" }
|
trx-protocol = { path = "../trx-protocol" }
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ use trx_core::audio::{
|
|||||||
};
|
};
|
||||||
use trx_core::decode::{AprsPacket, DecodedMessage, Ft8Message, WsprMessage};
|
use trx_core::decode::{AprsPacket, DecodedMessage, Ft8Message, WsprMessage};
|
||||||
use trx_core::rig::state::{RigMode, RigState};
|
use trx_core::rig::state::{RigMode, RigState};
|
||||||
|
use trx_aprs::AprsDecoder;
|
||||||
use trx_ft8::Ft8Decoder;
|
use trx_ft8::Ft8Decoder;
|
||||||
use trx_wspr::WsprDecoder;
|
use trx_wspr::WsprDecoder;
|
||||||
|
|
||||||
@@ -666,7 +667,7 @@ pub async fn run_aprs_decoder(
|
|||||||
decode_logs: Option<Arc<DecoderLoggers>>,
|
decode_logs: Option<Arc<DecoderLoggers>>,
|
||||||
) {
|
) {
|
||||||
info!("APRS decoder started ({}Hz, {} ch)", sample_rate, channels);
|
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 was_active = false;
|
||||||
let mut last_reset_seq: u64 = 0;
|
let mut last_reset_seq: u64 = 0;
|
||||||
let mut active = matches!(state_rx.borrow().status.mode, RigMode::PKT);
|
let mut active = matches!(state_rx.borrow().status.mode, RigMode::PKT);
|
||||||
|
|||||||
@@ -2,5 +2,4 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: BSD-2-Clause
|
// SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
pub mod aprs;
|
|
||||||
pub mod cw;
|
pub mod cw;
|
||||||
|
|||||||
Reference in New Issue
Block a user