diff --git a/Cargo.lock b/Cargo.lock index a391dd77a..ee5fd2a75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1981,7 +1981,7 @@ dependencies = [ "cfg-if 1.0.0", "indoc", "libc", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -2276,9 +2276,9 @@ dependencies = [ [[package]] name = "sbp" -version = "4.13.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453decc75450e3fdab69da3c07a7ad6ba8b138ac639f27620b9638f9bb3a8261" +checksum = "0304034c5655b4b439f322cbafd77dc763af2b7436772aab4eb0ed369be2524e" dependencies = [ "base64", "bytes", @@ -2294,9 +2294,9 @@ dependencies = [ [[package]] name = "sbp-settings" -version = "0.6.17" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7806d5ee9473fa88f1a88d69303e7b8bb2ec6f9ab4f2255ac501f8df6f45c5" +checksum = "fd6e9f139b0752b2b7cee4998f972e76eb183bb3aa6a22952b20167c4796b346" dependencies = [ "crossbeam-channel", "crossbeam-utils", diff --git a/console_backend/Cargo.toml b/console_backend/Cargo.toml index 761b43039..728fad4c8 100644 --- a/console_backend/Cargo.toml +++ b/console_backend/Cargo.toml @@ -40,8 +40,8 @@ serde-pickle = { version = "1.1.1", optional = true } parking_lot = "0.12.1" regex = { version = "1.5.6" } rust-ini = "0.18.0" -sbp = { version = "4.13.0", features = ["json", "link", "swiftnav"] } -sbp-settings = "0.6.16" +sbp = { version = "5.0.1", features = ["json", "link", "swiftnav"] } +sbp-settings = "0.6.18" env_logger = { version = "0.9", optional = true } mimalloc = { version = "0.1", default-features = false } indicatif = { version = "0.16", optional = true } diff --git a/console_backend/src/advanced_imu_tab.rs b/console_backend/src/advanced_imu_tab.rs index 75dc75676..28201182a 100644 --- a/console_backend/src/advanced_imu_tab.rs +++ b/console_backend/src/advanced_imu_tab.rs @@ -107,6 +107,9 @@ impl AdvancedImuTab { ImuType::TdkIam20680Hp => { self.imu_temp = 25_f64 + (msg.temp as f64 - 25_f64) / 326.8; } + ImuType::TdkIcm42670 => { + self.imu_temp = 25_f64 + (msg.temp as f64 / 128_f64); + } }; self.imu_conf = msg.imu_conf; } diff --git a/console_backend/src/advanced_networking_tab.rs b/console_backend/src/advanced_networking_tab.rs index 6735d5239..b8de1637d 100644 --- a/console_backend/src/advanced_networking_tab.rs +++ b/console_backend/src/advanced_networking_tab.rs @@ -157,10 +157,12 @@ impl AdvancedNetworkingTab { if self.running { if let Some(client) = &mut self.client { - if self.all_messages || OBS_MSGS.contains(&msg.message_type()) { - if let Ok(frame) = sbp::to_vec(msg) { - if let Err(_e) = client.send(&frame) { - // Need to squelch error for the case of no client listening. + if let Some(msg_type) = &msg.message_type() { + if self.all_messages || OBS_MSGS.contains(msg_type) { + if let Ok(frame) = sbp::to_vec(msg) { + if let Err(_e) = client.send(&frame) { + // Need to squelch error for the case of no client listening. + } } } } diff --git a/console_backend/src/baseline_tab.rs b/console_backend/src/baseline_tab.rs index 2fcc47158..a8ea9c501 100644 --- a/console_backend/src/baseline_tab.rs +++ b/console_backend/src/baseline_tab.rs @@ -523,7 +523,6 @@ impl BaselineTab { mod tests { use super::*; use crate::client_sender::TestSender; - use chrono::{TimeZone, Utc}; use sbp::messages::navigation::{MsgBaselineNed, MsgBaselineNedDepA, MsgGpsTime}; use std::io::sink; #[test] @@ -638,7 +637,10 @@ mod tests { baseline_table.utc_time = None; baseline_table.utc_source = None; baseline_table.handle_utc_time(msg); - let datetime = Utc.ymd(year as i32, month as u32, day as u32).and_hms_nano( + let datetime = utc_time( + year as i32, + month as u32, + day as u32, hours as u32, minutes as u32, seconds as u32, diff --git a/console_backend/src/solution_tab.rs b/console_backend/src/solution_tab.rs index c5ddcd4d9..a95fa710d 100644 --- a/console_backend/src/solution_tab.rs +++ b/console_backend/src/solution_tab.rs @@ -928,7 +928,6 @@ fn ll_meters_to_deg(l: f64, sf: f64, offset: f64) -> f64 { mod tests { use super::*; use crate::client_sender::TestSender; - use chrono::{TimeZone, Utc}; use sbp::messages::navigation::{ MsgAgeCorrections, MsgDops, MsgDopsDepA, MsgGpsTime, MsgPosLlh, MsgPosLlhDepA, MsgVelNed, MsgVelNedDepA, @@ -982,7 +981,10 @@ mod tests { solution_table.utc_time = None; solution_table.utc_source = None; solution_table.handle_utc_time(msg); - let datetime = Utc.ymd(year as i32, month as u32, day as u32).and_hms_nano( + let datetime = utc_time( + year as i32, + month as u32, + day as u32, hours as u32, minutes as u32, seconds as u32,