From 8fa81d21d6dd02e061c94de838bb12de409a35c1 Mon Sep 17 00:00:00 2001 From: adrian-kong Date: Fri, 1 Sep 2023 16:50:41 +1000 Subject: [PATCH 1/2] update sbp settings and sbp --- Cargo.lock | 7 +++---- console_backend/Cargo.toml | 4 ++-- .../src/tabs/advanced_tab/advanced_networking_tab.rs | 8 +++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3acc50814..5ea8f7d35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2595,9 +2595,9 @@ dependencies = [ [[package]] name = "sbp" -version = "4.17.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db425529eaeb2433689387c7567e43320f5bae4c5fdea307c11a225aace12f7b" +checksum = "95bfac42dc0fc72b89f17426a68c504a30291ecbf46f3645fb232adcb5b2396b" dependencies = [ "base64", "bytes", @@ -2614,8 +2614,7 @@ dependencies = [ [[package]] name = "sbp-settings" version = "0.6.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7806d5ee9473fa88f1a88d69303e7b8bb2ec6f9ab4f2255ac501f8df6f45c5" +source = "git+https://github.com/swift-nav/libsettings-rs.git?branch=adrian/update-baudrate-enum#c1d9672d22e51ad66f60a3c2730973cea1eb93a1" dependencies = [ "crossbeam-channel", "crossbeam-utils", diff --git a/console_backend/Cargo.toml b/console_backend/Cargo.toml index da451d563..0ee780342 100644 --- a/console_backend/Cargo.toml +++ b/console_backend/Cargo.toml @@ -20,7 +20,7 @@ directories = "5" crossbeam = "0.8" rand = "0.8.5" parking_lot = "0.12.1" -sbp-settings = "0.6.16" +sbp-settings = {git = "https://github.com/swift-nav/libsettings-rs.git", branch = "adrian/update-baudrate-enum"} rust-ini = "0.19.0" regex = "1.9.4" serde_json = "1" @@ -34,7 +34,7 @@ chrono = { version = "0.4.28", features = [ "std", ], default-features = false } serde = { version = "1.0.188", features = ["derive"] } -sbp = { version = "4.17.0", features = ["json", "link", "swiftnav"] } +sbp = { version = "5", features = ["json", "link", "swiftnav"] } mimalloc = { version = "0.1", default-features = false } serialport = { git = "https://github.com/swift-nav/serialport-rs.git", default-features = false } diff --git a/console_backend/src/tabs/advanced_tab/advanced_networking_tab.rs b/console_backend/src/tabs/advanced_tab/advanced_networking_tab.rs index 0dc487566..e9c4fbc03 100644 --- a/console_backend/src/tabs/advanced_tab/advanced_networking_tab.rs +++ b/console_backend/src/tabs/advanced_tab/advanced_networking_tab.rs @@ -176,9 +176,11 @@ impl AdvancedNetworkingTab { if self.running { if let Some(client) = &mut self.client { - if self.all_messages || OBS_MSGS.contains(&frame.msg_type()) { - if let Err(_e) = client.send(frame.as_bytes()) { - // Need to squelch error for the case of no client listening. + if let Some(msg_type) = &frame.msg_type() { + if self.all_messages || OBS_MSGS.contains(msg_type) { + if let Err(_e) = client.send(frame.as_bytes()) { + // Need to squelch error for the case of no client listening. + } } } } else { From 37684067b56e7fa531abd572ef8da80c354c6897 Mon Sep 17 00:00:00 2001 From: "jason@swift-nav.com" Date: Fri, 1 Sep 2023 18:39:40 +0000 Subject: [PATCH 2/2] update libsettings-rs, sneak in some nixos fixes --- Cargo.lock | 5 +++-- console_backend/Cargo.toml | 2 +- shell.nix | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ea8f7d35..e6c187ee0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2613,8 +2613,9 @@ dependencies = [ [[package]] name = "sbp-settings" -version = "0.6.17" -source = "git+https://github.com/swift-nav/libsettings-rs.git?branch=adrian/update-baudrate-enum#c1d9672d22e51ad66f60a3c2730973cea1eb93a1" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6e9f139b0752b2b7cee4998f972e76eb183bb3aa6a22952b20167c4796b346" dependencies = [ "crossbeam-channel", "crossbeam-utils", diff --git a/console_backend/Cargo.toml b/console_backend/Cargo.toml index 0ee780342..a76c9e26d 100644 --- a/console_backend/Cargo.toml +++ b/console_backend/Cargo.toml @@ -20,7 +20,7 @@ directories = "5" crossbeam = "0.8" rand = "0.8.5" parking_lot = "0.12.1" -sbp-settings = {git = "https://github.com/swift-nav/libsettings-rs.git", branch = "adrian/update-baudrate-enum"} +sbp-settings = "0.6.18" rust-ini = "0.19.0" regex = "1.9.4" serde_json = "1" diff --git a/shell.nix b/shell.nix index 650b38470..876e5badc 100644 --- a/shell.nix +++ b/shell.nix @@ -7,7 +7,7 @@ libxcrypt-legacy glib capnproto - openssl + openssl.dev pkg-config cmake clang @@ -22,7 +22,7 @@ alsa-lib dbus libkrb5 - zlib + zlib.dev gdb ]) ++ (with pkgs.xorg; [ libX11 @@ -49,7 +49,7 @@ unset QTWEBKIT_PLUGIN_PATH unset QT_PLUGIN_PATH - export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig" + export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig:${pkgs.zlib.dev}/lib/pkgconfig" export LIBCLANG_PATH="${pkgs.llvmPackages_11.libclang.lib}/lib" ''; runScript = "bash";