Skip to content

Commit

Permalink
Update ublox requirement from 0.3.0 to 0.4.4
Browse files Browse the repository at this point in the history
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] <[email protected]>
Co-authored-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
dependabot[bot] and gwbres committed Sep 28, 2023
1 parent d1f600e commit 2d551fc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ublox-rnx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
48 changes: 23 additions & 25 deletions ublox-rnx/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rinex::prelude::*;

extern crate ublox;
use ublox::*;
//use ublox::{CfgPrtUart, UartPortId};
use ublox::{CfgPrtUart, UartPortId};

mod device;

Expand All @@ -34,7 +34,6 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
.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(
Expand All @@ -52,7 +51,6 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
.into_packet_bytes(),
)?;
device.wait_for_ack::<CfgPrtUart>().unwrap();
*/

/* NEED UBX CRATE UPDATE!!
device.write_all(
Expand Down Expand Up @@ -93,12 +91,12 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
///////////////////////
// Observation opmode
///////////////////////
// device
// .write_all(
// &CfgMsgAllPortsBuilder::set_rate_for::<NavSat>([0, 1, 0, 0, 0, 0]).into_packet_bytes(),
// )
// .unwrap();
// device.wait_for_ack::<CfgMsgAllPorts>().unwrap();
device
.write_all(
&CfgMsgAllPortsBuilder::set_rate_for::<NavSat>([0, 1, 0, 0, 0, 0]).into_packet_bytes(),
)
.unwrap();
device.wait_for_ack::<CfgMsgAllPorts>().unwrap();

///////////////////////
// Navigation opmode
Expand Down Expand Up @@ -133,22 +131,22 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
// 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
Expand Down

0 comments on commit 2d551fc

Please sign in to comment.