diff --git a/Cargo.lock b/Cargo.lock index d39bb5e6af7ca5d8398eae18b936e2775b18c031..d5083b0923d58665cee8484e98f85daa73000a0a 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 f6393bb76e52b6292479ab399da85f9a8ed2b78f..52afe786b71053ea9d3a7a9b154d9a6fa78ac0ea 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; }