Skip to content

Commit

Permalink
Updated dht22_pi dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoradocchia committed Jul 16, 2022
1 parent 51e6a67 commit 729e58f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ categories = ["command-line-utilities", "science"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dht22_pi = { version = "0.3.0" }
dht22_pi = { git = "https://github.com/marcoradocchia/dht22_pi" }
clap = { version = "3.2.8", features = ["derive"] }
chrono = { version = "0.4.19" }
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum ErrorKind {
/// Occurs when max retries value is reached while reading DHT22 sensor.
MaxRetries,
/// Occurs when theres is an issue with file output.
FileError(String)
FileError(String),
}

impl Display for ErrorKind {
Expand Down Expand Up @@ -178,6 +178,7 @@ fn run() -> Result<(), ErrorKind> {
let mut retries = 0;
tx.send(Measure::new(
// reading
// Loop until valid result is obtained or max retries value is reached.
loop {
match dht22_pi::read(args.pin) {
Err(e) => {
Expand Down

0 comments on commit 729e58f

Please sign in to comment.