Skip to content

Commit

Permalink
Fix bug with float comparation https://t.me/canairio/18540
Browse files Browse the repository at this point in the history
  • Loading branch information
melkati committed Nov 29, 2021
1 parent a8a60a1 commit 8420e8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ void Sensors::CO2scd30Init() {
delay(10);
}

if(scd30.getTemperatureOffset() != toffset) {
if(uint16_t((scd30.getTemperatureOffset()*100)) != (uint16_t(toffset*100))) {
Serial.println("-->[SLIB] SCD30 setting new temp offset: " + String(toffset));
setSCD30TempOffset(toffset);
delay(10);
Expand Down

0 comments on commit 8420e8d

Please sign in to comment.