1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-16 18:22:22 +01:00

Support ESP8266 Arduino 3.0.0 (#1897)

Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
Stefan Agner
2021-06-15 08:50:58 +02:00
committed by GitHub
parent 92bbedfa5a
commit a80f9ed336
4 changed files with 17 additions and 2 deletions

View File

@@ -237,7 +237,7 @@ optional<float> FilterOutValueFilter::new_value(float value) {
return value;
} else {
int8_t accuracy = this->parent_->get_accuracy_decimals();
float accuracy_mult = pow10f(accuracy);
float accuracy_mult = powf(10.0f, accuracy);
float rounded_filter_out = roundf(accuracy_mult * this->value_to_filter_out_);
float rounded_value = roundf(accuracy_mult * value);
if (rounded_filter_out == rounded_value)