Skip to content

Commit

Permalink
feat(hil): Add parse_duration crate for hil
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKaravaev committed Nov 27, 2024
1 parent 064d1f2 commit b3dbb37
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 35 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions hil/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ libftd2xx = { version = "0.32.4", features = ["static"] }
nusb.workspace = true
orb-build-info.path = "../build-info"
orb-security-utils = { workspace = true, features = ["reqwest"] }
humantime = "2.1.0"
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"] }
secrecy.workspace = true
tempfile = "3"
Expand Down
2 changes: 1 addition & 1 deletion hil/src/commands/button_ctrl.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use clap::Parser;
use color_eyre::{eyre::WrapErr as _, Result};
use humantime::parse_duration;
use std::time::Duration;
use tracing::info;

use crate::boot::BUTTON_PIN;
use crate::ftdi::{FtdiGpio, OutputState};
use crate::utils::parse_duration;

#[derive(Debug, Parser)]
pub struct ButtonCtrl {
Expand Down
2 changes: 1 addition & 1 deletion hil/src/commands/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use color_eyre::{
Result,
};
use futures::{TryStream, TryStreamExt as _};
use humantime::parse_duration;
use tokio::{
io::{AsyncRead, AsyncWrite, AsyncWriteExt as _},
sync::broadcast,
Expand All @@ -16,7 +17,6 @@ use tokio_stream::wrappers::BroadcastStream;
use tracing::{debug, warn};

use crate::serial::{spawn_serial_reader_task, WaitErr};
use crate::utils::parse_duration;

const PATTERN_START: &str = "hil_pattern_start-";
const PATTERN_END: &str = "-hil_pattern_end";
Expand Down
1 change: 0 additions & 1 deletion hil/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ mod download_s3;
mod flash;
mod ftdi;
mod serial;
mod utils;

use camino::Utf8PathBuf;
use clap::{Parser, Subcommand};
Expand Down
32 changes: 0 additions & 32 deletions hil/src/utils.rs

This file was deleted.

0 comments on commit b3dbb37

Please sign in to comment.