From 41d4549af5a793eb3b1c4f1613fead1cbf5a7c8b Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 30 May 2023 08:33:29 -0400 Subject: [PATCH] update metadata and dependency versions --- Cargo.lock | 42 +++++++++++++++++++----------------------- Cargo.toml | 41 ++++++++++++++++++++--------------------- src/tui/draw.rs | 48 ++++++++++++++++++++++++------------------------ 3 files changed, 63 insertions(+), 68 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 380866a2..65cb8370 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,6 +38,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -218,13 +224,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "fdbc37d37da9e5bce8173f3a41b71d9bf3c674deebbaceacd0ebdabde76efb03" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", "time 0.1.45", @@ -572,9 +578,9 @@ dependencies = [ [[package]] name = "geo" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d640a4dd1d1c98b45f4653c841a8ec15f461a71b86bc30533ae64c6f20f268" +checksum = "c07ac450e9e7d8c08e58d2723d46bd0328bb6cc1d7b18f4f37a1e15a311098b0" dependencies = [ "float_next_after", "geo-types", @@ -1038,16 +1044,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.15" @@ -1070,15 +1066,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "12df40a956736488b7b44fe79fe12d4f245bb5b3f5a1f6095e499760015be392" dependencies = [ "bitflags 1.3.2", "cfg-if", @@ -1108,9 +1104,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" dependencies = [ "cc", "libc", @@ -1308,9 +1304,9 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc0d032bccba900ee32151ec0265667535c230169f5a011154cdcd984e16829" +checksum = "ce841e0486e7c2412c3740168ede33adeba8e154a15107b879d8162d77c7174e" dependencies = [ "bitflags 1.3.2", "cassowary", diff --git a/Cargo.toml b/Cargo.toml index e936fee5..b55eff5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,11 +2,10 @@ name = "packetraven" authors = ["Zach Burnett "] description = "track high-altitude balloon telemetry from a variety of sources" -version = "3.0.5" +version = "3.0.6" edition = "2021" readme = "README.md" license = "GPL-3.0-or-later" -license-file = "LICENSE" repository = "https://github.com/UMDBPP/PacketRaven.git" homepage = "https://github.com/UMDBPP/PacketRaven" documentation = "https://packetraven.readthedocs.io" @@ -21,23 +20,23 @@ serial = ["dep:serialport"] postgres = ["dep:postgres"] [dependencies] -aprs-parser = "0.4.0" -chrono = { version = "0.4.24", features = ["clock"] } -clap = { version = "4.2.7", features = ["derive"] } -custom_error = "1.9.2" -geo = { version = "0.24.1", features = ["serde"] } -geojson = "0.24.0" -lazy_static = "1.4.0" -log = "0.4.17" +aprs-parser = ">=0.4.0" +chrono = { version = ">=0.4.24", features = ["clock"] } +clap = { version = ">=4.2.7", features = ["derive"] } +custom_error = ">=1.9.2" +geo = { version = ">=0.24.1", features = ["serde"] } +geojson = ">=0.24.0" +lazy_static = ">=1.4.0" +log = ">=0.4.17" postgres = { version="0.19.5", optional=true } -ratatui = "0.20.1" -crossterm = "*" -regex = "1.8.1" -reqwest = { version = "0.11.17", features = ["json", "blocking", "gzip"] } -serde = "1.0.160" -serde_json = "1.0.96" -serde_with = { version = "3.0.0", features = ["chrono"] } -serde_yaml = "0.9.21" -serialport = { version= "4.2.0", optional=true } -url = "2.3.1" -geo-types = "0.7.9" +ratatui = ">=0.21.0" +crossterm = ">=0.26.1" +regex = ">=1.8.1" +reqwest = { version = ">=0.11.17", features = ["json", "blocking", "gzip"] } +serde = ">=1.0.160" +serde_json = ">=1.0.96" +serde_with = { version = ">=3.0.0", features = ["chrono"] } +serde_yaml = ">=0.9.21" +serialport = { version= ">=4.2.0", optional=true } +url = ">=2.3.1" +geo-types = ">=0.7.9" diff --git a/src/tui/draw.rs b/src/tui/draw.rs index 214d8e09..93bab796 100644 --- a/src/tui/draw.rs +++ b/src/tui/draw.rs @@ -19,11 +19,11 @@ pub fn draw( ) .split(size); - let mut titles: Vec = app + let mut titles: Vec = app .tracks .iter() .map(|track| { - ratatui::text::Spans::from(vec![ratatui::text::Span::styled( + ratatui::text::Line::from(vec![ratatui::text::Span::styled( track.name.to_owned(), ratatui::style::Style::default().fg(ratatui::style::Color::Green), )]) @@ -31,7 +31,7 @@ pub fn draw( .collect(); titles.insert( 0, - ratatui::text::Spans::from(vec![ratatui::text::Span::raw("Log")]), + ratatui::text::Line::from(vec![ratatui::text::Span::raw("Log")]), ); let tabs = ratatui::widgets::Tabs::new(titles) .block(ratatui::widgets::Block::default().borders(ratatui::widgets::Borders::ALL)) @@ -58,7 +58,7 @@ pub fn draw( _ => bold_style, }; - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled( format!("{:} ", time.format(&crate::DATETIME_FORMAT)), bold_style, @@ -67,7 +67,7 @@ pub fn draw( ratatui::text::Span::raw(message), ]) }) - .collect::>(), + .collect::>(), ) .scroll((app.log_messages_scroll_offset, 0)) .wrap(ratatui::widgets::Wrap { trim: true }) @@ -177,7 +177,7 @@ pub fn draw( let last_location = track.locations.last().unwrap(); - let mut last_location_info = vec![ratatui::text::Spans::from(vec![ + let mut last_location_info = vec![ratatui::text::Line::from(vec![ ratatui::text::Span::styled("time: ", bold_style), ratatui::text::Span::raw(format!( "{:} ({:})", @@ -189,7 +189,7 @@ pub fn draw( ])]; if track.locations.len() > 1 { - last_location_info.push(ratatui::text::Spans::from(vec![ + last_location_info.push(ratatui::text::Line::from(vec![ ratatui::text::Span::styled("since prev.: ", bold_style), ratatui::text::Span::raw(crate::utilities::duration_string( intervals.last().unwrap(), @@ -197,7 +197,7 @@ pub fn draw( ])); } - last_location_info.push(ratatui::text::Spans::from(vec![ + last_location_info.push(ratatui::text::Line::from(vec![ ratatui::text::Span::styled("coordinates: ", bold_style), ratatui::text::Span::raw(format!( "({:.2}, {:.2})", @@ -206,7 +206,7 @@ pub fn draw( ])); if let Some(altitude) = last_location.location.altitude { - last_location_info.push(ratatui::text::Spans::from(vec![ + last_location_info.push(ratatui::text::Line::from(vec![ ratatui::text::Span::styled("altitude: ", bold_style), ratatui::text::Span::raw(format!("{:.2} m", altitude)), ])); @@ -214,14 +214,14 @@ pub fn draw( if track.locations.len() > 1 { last_location_info.extend([ - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("over ground: ", bold_style), ratatui::text::Span::raw(format!( "{:.2} m", overground_distances.last().unwrap(), )), ]), - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("ground speed: ", bold_style), ratatui::text::Span::raw(format!( "{:.2} m/s", @@ -232,11 +232,11 @@ pub fn draw( if has_altitude { last_location_info.extend([ - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("ascent: ", bold_style), ratatui::text::Span::raw(format!("{:.2} m", ascents.last().unwrap(),)), ]), - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("ascent rate: ", bold_style), ratatui::text::Span::raw(format!( "{:.2} m/s", @@ -259,7 +259,7 @@ pub fn draw( let mut descent_info = vec![]; if track.descending() { if has_altitude { - descent_info.push(ratatui::text::Spans::from(vec![ + descent_info.push(ratatui::text::Line::from(vec![ ratatui::text::Span::styled("max altitude: ", bold_style), ratatui::text::Span::raw(format!("{:.2} m", altitude_range[1])), ])); @@ -268,7 +268,7 @@ pub fn draw( if let Some(estimated_time_to_ground) = track.estimated_time_to_ground() { let landing_time = last_location.location.time + estimated_time_to_ground; - descent_info.push(ratatui::text::Spans::from(vec![ + descent_info.push(ratatui::text::Line::from(vec![ ratatui::text::Span::styled("est. landing: ", bold_style), ratatui::text::Span::raw(format!( "{:} ({:})", @@ -284,7 +284,7 @@ pub fn draw( let landing_time = last_location.location.time + freefall_estimate.time_to_ground; - descent_info.push(ratatui::text::Spans::from(vec![ + descent_info.push(ratatui::text::Line::from(vec![ ratatui::text::Span::styled("@ term. vel.: ", bold_style), ratatui::text::Span::raw(format!( "{:} ({:})", @@ -300,7 +300,7 @@ pub fn draw( if let Some(prediction) = &track.prediction { if let Some(predicted_landing_location) = prediction.last() { descent_info.extend([ - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("pred. landing: ", bold_style), ratatui::text::Span::raw(format!( "{:} ({:})", @@ -314,7 +314,7 @@ pub fn draw( .format(&crate::DATETIME_FORMAT) )), ]), - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("pred. landing: ", bold_style), ratatui::text::Span::raw(format!( "({:.2}, {:.2})", @@ -357,7 +357,7 @@ pub fn draw( as i64, ); let ascent_info = ratatui::widgets::Paragraph::new(vec![ - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("est. max alt.: ", bold_style), ratatui::text::Span::raw(format!( "{:} ({:})", @@ -368,7 +368,7 @@ pub fn draw( ) )), ]), - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("pred. max alt.: ", bold_style), ratatui::text::Span::raw(format!( "{:} ({:})", @@ -397,7 +397,7 @@ pub fn draw( let mut track_info = vec![]; if has_altitude { track_info.extend([ - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled( format!("{:<10}", "pos. ascent rate: "), bold_style, @@ -408,7 +408,7 @@ pub fn draw( / positive_ascent_rates.len() as f64 )), ]), - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled( format!("{:<10}", "neg. ascent rate: "), bold_style, @@ -423,14 +423,14 @@ pub fn draw( } track_info.extend([ - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("ground speed: ", bold_style), ratatui::text::Span::raw(format!( "{:.2} m/s", ground_speeds.iter().sum::() / ground_speeds.len() as f64, )), ]), - ratatui::text::Spans::from(vec![ + ratatui::text::Line::from(vec![ ratatui::text::Span::styled("time interval: ", bold_style), ratatui::text::Span::raw(crate::utilities::duration_string( &chrono::Duration::seconds(