1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00

[bmp085] Fix error in read of pressure (#8359)

This commit is contained in:
Gustavo de León
2025-03-03 15:06:30 -06:00
committed by GitHub
parent 323209523b
commit 4ed78023b6

View File

@@ -95,7 +95,7 @@ void BMP085Component::read_pressure_() {
return;
}
uint32_t value = (uint32_t(buffer[0]) << 16) | (uint32_t(buffer[1]) << 8) | uint32_t(buffer[0]);
uint32_t value = (uint32_t(buffer[0]) << 16) | (uint32_t(buffer[1]) << 8) | uint32_t(buffer[2]);
if ((value >> 5) == 0) {
ESP_LOGW(TAG, "Invalid pressure!");
this->status_set_warning();