Skip to content

Commit

Permalink
removed esp31-fix because of the issue no longer being present
Browse files Browse the repository at this point in the history
  • Loading branch information
FloppyDisck committed Oct 27, 2023
1 parent 1ddf0ae commit 4050633
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ keywords = ["embedded", "sensor", "temperature", "humidity"]
categories = ["embedded"]

[features]
esp32-fix = []
thiserror = ["dep:thiserror"]

[dependencies]
Expand Down
10 changes: 0 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,25 +322,15 @@ where

let (sub, mul) = match self.unit {
TemperatureUnit::Celsius => {
// TODO: figure out why this is necessary
#[cfg(feature = "esp32-fix")]
println!();
CELSIUS_PAIR
}
TemperatureUnit::Fahrenheit => {
#[cfg(feature = "esp32-fix")]
println!();
FAHRENHEIT_PAIR
}
};

let pre_sub = mul * (raw_temp / CONVERSION_DENOM);

// This needs to be printed, if not temperature = - temperature
// i swear to god im not making this up
#[cfg(feature = "esp32-fix")]
println!("{}", pre_sub);

let temperature = pre_sub - sub;

let raw_humidity = Self::merge_bytes(buffer[3], buffer[4]) as f32;
Expand Down

0 comments on commit 4050633

Please sign in to comment.