1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-13 14:20:29 +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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,7 +95,7 @@ void BMP085Component::read_pressure_() {
return; 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) { if ((value >> 5) == 0) {
ESP_LOGW(TAG, "Invalid pressure!"); ESP_LOGW(TAG, "Invalid pressure!");
this->status_set_warning(); this->status_set_warning();