[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:
@@ -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)
|
||||
@@ -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" }
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
//
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
pub mod aprs;
|
||||
pub mod cw;
|
||||
|
||||
Reference in New Issue
Block a user