[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:
@@ -230,6 +230,7 @@ fn parse_frame(frame: RawFrame, channel: &str) -> Option<AisMessage> {
|
||||
let mmsi = get_uint(&bits, 8, 30)? as u32;
|
||||
|
||||
let mut msg = AisMessage {
|
||||
rig_id: None,
|
||||
ts_ms: None,
|
||||
channel: channel.to_string(),
|
||||
message_type,
|
||||
|
||||
@@ -413,6 +413,7 @@ fn parse_aprs(ax25: &Ax25Frame) -> AprsPacket {
|
||||
}
|
||||
|
||||
AprsPacket {
|
||||
rig_id: None,
|
||||
ts_ms: None,
|
||||
src_call,
|
||||
dest_call,
|
||||
|
||||
@@ -399,6 +399,7 @@ impl CwDecoder {
|
||||
|
||||
fn emit_event(&mut self, text: &str) {
|
||||
self.events.push(CwEvent {
|
||||
rig_id: None,
|
||||
text: text.to_string(),
|
||||
wpm: self.wpm,
|
||||
tone_hz: self.tone_freq,
|
||||
|
||||
@@ -226,6 +226,7 @@ impl VdesDecoder {
|
||||
});
|
||||
|
||||
Some(VdesMessage {
|
||||
rig_id: None,
|
||||
ts_ms: None,
|
||||
channel: channel.to_string(),
|
||||
message_type: parsed.message_id.unwrap_or(mode.message_type),
|
||||
@@ -421,6 +422,7 @@ fn build_unsynced_message(
|
||||
let raw_bytes = pack_dibits_msb(raw_symbols);
|
||||
let sync_pct = framed.sync_score * 100.0;
|
||||
VdesMessage {
|
||||
rig_id: None,
|
||||
ts_ms: None,
|
||||
channel: channel.to_string(),
|
||||
message_type: mode.message_type,
|
||||
|
||||
Reference in New Issue
Block a user