From 2736d91798c02c50bdf6f58a8e954cf3ca30cc61 Mon Sep 17 00:00:00 2001 From: Stephen D <webmaster@scd31.com> Date: Fri, 1 Dec 2023 12:54:31 -0400 Subject: [PATCH] update to latest ham-cats --- Cargo.lock | 2 +- src/radio.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d39bb5e..d5083b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -307,7 +307,7 @@ dependencies = [ [[package]] name = "ham-cats" version = "0.1.0" -source = "git+https://gitlab.scd31.com/cats/ham-cats#81e90ddc21a4aa0e56acd05a18edb658593cf434" +source = "git+https://gitlab.scd31.com/cats/ham-cats#25ed83d5eb68cd54f438f487c37f9059cd464e87" dependencies = [ "arrayvec", "bitvec", diff --git a/src/radio.rs b/src/radio.rs index f6393bb..52afe78 100644 --- a/src/radio.rs +++ b/src/radio.rs @@ -79,7 +79,8 @@ impl<'a> RadioManager<'a> { if let Some((callsign, ssid)) = ident { let mut buf = [0; MAX_PACKET_LEN]; if let Ok(packet) = Packet::fully_decode(data.data(), &mut buf) { - self.handle_packet_rx(led, packet, callsign, ssid); + let rssi = data.rssi(); + self.handle_packet_rx(led, packet, callsign, ssid, rssi); } } } @@ -141,7 +142,7 @@ impl<'a> RadioManager<'a> { } if !rx { - // didn't an rx packet, so we're safe to leave + // didn't rx a packet, so we're safe to leave break Some(()); } } @@ -153,9 +154,10 @@ impl<'a> RadioManager<'a> { mut packet: Packet<MAX_PACKET_LEN>, callsign: &str, ssid: u8, + rssi: f64, ) { if packet.should_digipeat(callsign, ssid).is_ok() { - if packet.append_to_route(callsign, ssid).is_err() { + if packet.append_to_route(callsign, ssid, Some(rssi)).is_err() { return; } -- GitLab