diff --git a/Cargo.lock b/Cargo.lock index 2056702..0b96066 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,7 +89,7 @@ dependencies = [ [[package]] name = "bme680-json" -version = "1.0.2" +version = "1.0.3" dependencies = [ "anyhow", "bme680", diff --git a/Cargo.toml b/Cargo.toml index 59f383e..f57fa08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bme680-json" -version = "1.0.2" +version = "1.0.3" edition = "2021" [dependencies] diff --git a/src/main.rs b/src/main.rs index 82ab1a3..efd6d45 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,7 @@ struct Args { /// Delay reading by the specified amount in milliseconds. #[arg(long, default_value_t = 1000)] - delay_before_read: u32 + delay: u32 } fn main() -> Result<(), anyhow::Error> { @@ -47,7 +47,7 @@ fn main() -> Result<(), anyhow::Error> { dev.set_sensor_settings(&mut delay, &settings)?; dev.set_sensor_mode(&mut delay, PowerMode::ForcedMode)?; - Delay {}.delay_ms(args.delay_before_read); + Delay {}.delay_ms(args.delay); let (data, _) = dev.get_measurement(&mut delay)?; let serialized = serde_json::to_string(&JsonData{ temperature: data.temperature_celsius(),