From b85bc457fee0ec13d8ebeb73914e32378a1e09b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:47:39 +0200 Subject: [PATCH] Update ublox requirement from 0.3.0 to 0.4.4 (#173) Updates the requirements on [ublox](https://github.com/lkolbly/ublox) to permit the latest version. - [Commits](https://github.com/lkolbly/ublox/commits) --- updated-dependencies: - dependency-name: ublox dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Guillaume W. Bres --- ublox-rnx/Cargo.toml | 2 +- ublox-rnx/src/main.rs | 48 +++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/ublox-rnx/Cargo.toml b/ublox-rnx/Cargo.toml index a02735238..637eda359 100644 --- a/ublox-rnx/Cargo.toml +++ b/ublox-rnx/Cargo.toml @@ -16,6 +16,6 @@ chrono = "0.4" serde = "1.0" serde_json = "1.0" serialport = "4.2.0" -ublox = "0.3.0" +ublox = "0.4.4" rinex = { path = "../rinex", features = ["serde"] } clap = { version = "3.2.22", features = ["yaml"] } diff --git a/ublox-rnx/src/main.rs b/ublox-rnx/src/main.rs index b30ece8ef..6c4a2ff0f 100644 --- a/ublox-rnx/src/main.rs +++ b/ublox-rnx/src/main.rs @@ -12,7 +12,7 @@ use rinex::prelude::*; extern crate ublox; use ublox::*; -//use ublox::{CfgPrtUart, UartPortId}; +use ublox::{CfgPrtUart, UartPortId}; mod device; @@ -34,7 +34,6 @@ pub fn main() -> Result<(), Box> { .expect(&format!("failed to open serial port \"{}\"", port)); let mut device = device::Device::new(port); - /* needs ublox crate update !! // Enable UBX protocol on all ports // so User can connect to all of them device.write_all( @@ -52,7 +51,6 @@ pub fn main() -> Result<(), Box> { .into_packet_bytes(), )?; device.wait_for_ack::().unwrap(); - */ /* NEED UBX CRATE UPDATE!! device.write_all( @@ -93,12 +91,12 @@ pub fn main() -> Result<(), Box> { /////////////////////// // Observation opmode /////////////////////// - // device - // .write_all( - // &CfgMsgAllPortsBuilder::set_rate_for::([0, 1, 0, 0, 0, 0]).into_packet_bytes(), - // ) - // .unwrap(); - // device.wait_for_ack::().unwrap(); + device + .write_all( + &CfgMsgAllPortsBuilder::set_rate_for::([0, 1, 0, 0, 0, 0]).into_packet_bytes(), + ) + .unwrap(); + device.wait_for_ack::().unwrap(); /////////////////////// // Navigation opmode @@ -133,22 +131,22 @@ pub fn main() -> Result<(), Box> { // main loop let _ = device.update(|packet| { match packet { - // PacketRef::NavSat(pkt) => { - // for sv in pkt.svs() { - // let _gnss_id = sv.gnss_id(); - // let _sv_id = sv.sv_id(); - // let _elev = sv.elev(); - // let _azim = sv.azim(); - // let _pr_res = sv.pr_res(); - // let _flags = sv.flags(); - // //if flags.sv_used() { - // //} - // //flags.health(); - // //flags.quality_ind(); - // //flags.differential_correction_available(); - // //flags.ephemeris_available(); - // } - // }, + PacketRef::NavSat(pkt) => { + for sv in pkt.svs() { + let _gnss_id = sv.gnss_id(); + let _sv_id = sv.sv_id(); + let _elev = sv.elev(); + let _azim = sv.azim(); + let _pr_res = sv.pr_res(); + let _flags = sv.flags(); + //if flags.sv_used() { + //} + //flags.health(); + //flags.quality_ind(); + //flags.differential_correction_available(); + //flags.ephemeris_available(); + } + }, /* NEED UBX CRATE UPDATE !! PacketRef::NavEoe(pkt) => { // End of epoch notification