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:
parent
323209523b
commit
4ed78023b6
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user