mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
BME280: fix typos, use forced mode constant (#974)
* Fix typo in BME280 chip ID error message * Use BME280 forced mode constant instead of literal
This commit is contained in:
parent
e6f21873c3
commit
7721049ed7
1 changed files with 2 additions and 2 deletions
|
@ -146,7 +146,7 @@ void BME280Component::dump_config() {
|
|||
ESP_LOGE(TAG, "Communication with BME280 failed!");
|
||||
break;
|
||||
case WRONG_CHIP_ID:
|
||||
ESP_LOGE(TAG, "BMP280 has wrong chip ID! Is it a BMP280?");
|
||||
ESP_LOGE(TAG, "BME280 has wrong chip ID! Is it a BME280?");
|
||||
break;
|
||||
case NONE:
|
||||
default:
|
||||
|
@ -172,7 +172,7 @@ void BME280Component::update() {
|
|||
uint8_t meas_register = 0;
|
||||
meas_register |= (this->temperature_oversampling_ & 0b111) << 5;
|
||||
meas_register |= (this->pressure_oversampling_ & 0b111) << 2;
|
||||
meas_register |= 0b01; // Forced mode
|
||||
meas_register |= BME280_MODE_FORCED;
|
||||
if (!this->write_byte(BME280_REGISTER_CONTROL, meas_register)) {
|
||||
this->status_set_warning();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue