[fix](trx-rs): use per-message rig_id for map marker tagging

The map module was tagging all decode markers (APRS, AIS, VDES,
FT8/FT4/FT2/WSPR locators) with the global rig picker's active rig
instead of the actual source rig. This made the map's own rig filter
dropdown ineffective in multi-rig setups.

- Add rig_id field to all decode message structs (AisMessage,
  VdesMessage, AprsPacket, CwEvent, Ft8Message, WsprMessage)
- Set rig_id on messages in audio_client before broadcasting, using
  the actual rig connection identifier
- Update history collector to prefer message rig_id over the global
  active rig fallback
- Pass rig_id through plugin normalize functions (AIS, APRS, VDES,
  HF-APRS) so it reaches the map add functions
- Update all map marker functions (aprsMapAddStation, aisMapAddVessel,
  vdesMapAddPoint, mapAddLocator) to use the message's rig_id with
  fallback to the global picker for backward compatibility

https://claude.ai/code/session_015gC7axHk2jmp7HbFPdbivN
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-26 14:49:15 +00:00
committed by Stan Grams
parent a63f27971d
commit 8e6623b39e
14 changed files with 95 additions and 24 deletions
+8
View File
@@ -1806,6 +1806,7 @@ pub async fn run_ft8_decoder(
let base_freq_hz = state_rx.borrow().status.freq.hz as f64;
let abs_freq_hz = base_freq_hz + res.freq_hz as f64;
let msg = Ft8Message {
rig_id: None,
ts_ms,
snr_db: res.snr_db,
dt_s: res.dt_s,
@@ -1961,6 +1962,7 @@ pub async fn run_ft4_decoder(
let base_freq_hz = state_rx.borrow().status.freq.hz as f64;
let abs_freq_hz = base_freq_hz + res.freq_hz as f64;
let msg = Ft8Message {
rig_id: None,
ts_ms,
snr_db: res.snr_db,
dt_s: res.dt_s,
@@ -2110,6 +2112,7 @@ pub async fn run_ft2_decoder(
let base_freq_hz = state_rx.borrow().status.freq.hz as f64;
let abs_freq_hz = base_freq_hz + res.freq_hz as f64;
let msg = Ft8Message {
rig_id: None,
ts_ms,
snr_db: res.snr_db,
dt_s: res.dt_s,
@@ -2260,6 +2263,7 @@ pub async fn run_wspr_decoder(
Err(_) => 0,
};
let msg = WsprMessage {
rig_id: None,
ts_ms,
snr_db: res.snr_db,
dt_s: res.dt_s,
@@ -2514,6 +2518,7 @@ async fn run_background_ft8_decoder(
for res in results {
let abs_freq_hz = base_freq_hz as f64 + res.freq_hz as f64;
let msg = Ft8Message {
rig_id: None,
ts_ms: current_timestamp_ms(),
snr_db: res.snr_db,
dt_s: res.dt_s,
@@ -2593,6 +2598,7 @@ async fn run_background_ft4_decoder(
for res in results {
let abs_freq_hz = base_freq_hz as f64 + res.freq_hz as f64;
let msg = Ft8Message {
rig_id: None,
ts_ms: current_timestamp_ms(),
snr_db: res.snr_db,
dt_s: res.dt_s,
@@ -2663,6 +2669,7 @@ async fn run_background_ft2_decoder(
for res in results {
let abs_freq_hz = base_freq_hz as f64 + res.freq_hz as f64;
let msg = Ft8Message {
rig_id: None,
ts_ms: current_timestamp_ms(),
snr_db: res.snr_db,
dt_s: res.dt_s,
@@ -2727,6 +2734,7 @@ async fn run_background_wspr_decoder(
Ok(results) => {
for res in results {
let msg = WsprMessage {
rig_id: None,
ts_ms: current_timestamp_ms(),
snr_db: res.snr_db,
dt_s: res.dt_s,