mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Bme680 pressure value fix (#550)
* Add heater bit masks
* Fix erroneous pressure value for BME680
* Revert "Add heater bit masks"
This reverts commit c7629f106c
.
This commit is contained in:
parent
ed61c1dd58
commit
8c73558165
1 changed files with 1 additions and 1 deletions
|
@ -232,7 +232,7 @@ float BME680Component::get_setup_priority() const { return setup_priority::DATA;
|
||||||
void BME680Component::update() {
|
void BME680Component::update() {
|
||||||
uint8_t meas_control = 0; // No need to fetch, we're setting all fields
|
uint8_t meas_control = 0; // No need to fetch, we're setting all fields
|
||||||
meas_control |= (this->temperature_oversampling_ & 0b111) << 5;
|
meas_control |= (this->temperature_oversampling_ & 0b111) << 5;
|
||||||
meas_control |= (this->pressure_oversampling_ & 0b111) << 5;
|
meas_control |= (this->pressure_oversampling_ & 0b111) << 2;
|
||||||
meas_control |= 0b01; // forced mode
|
meas_control |= 0b01; // forced mode
|
||||||
if (!this->write_byte(BME680_REGISTER_CONTROL_MEAS, meas_control)) {
|
if (!this->write_byte(BME680_REGISTER_CONTROL_MEAS, meas_control)) {
|
||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
|
|
Loading…
Reference in a new issue