From 7721049ed787958437818da2690169a85b926d0d Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sat, 8 Feb 2020 18:10:07 +0100 Subject: [PATCH] BME280: fix typos, use forced mode constant (#974) * Fix typo in BME280 chip ID error message * Use BME280 forced mode constant instead of literal --- esphome/components/bme280/bme280.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/bme280/bme280.cpp b/esphome/components/bme280/bme280.cpp index b7c7f12f6f..6bb5ac9800 100644 --- a/esphome/components/bme280/bme280.cpp +++ b/esphome/components/bme280/bme280.cpp @@ -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;