mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
[bmp3xx] Remove redundant "bmp3xx" from log messages (#8965)
This commit is contained in:
parent
6a225cb4c0
commit
8cbe2b41f6
@ -73,7 +73,7 @@ void BMP3XXComponent::setup() {
|
|||||||
ESP_LOGCONFIG(TAG, "Running setup");
|
ESP_LOGCONFIG(TAG, "Running setup");
|
||||||
// Call the Device base class "initialise" function
|
// Call the Device base class "initialise" function
|
||||||
if (!reset()) {
|
if (!reset()) {
|
||||||
ESP_LOGE(TAG, "Failed to reset BMP3XX...");
|
ESP_LOGE(TAG, "Failed to reset");
|
||||||
this->error_code_ = ERROR_SENSOR_RESET;
|
this->error_code_ = ERROR_SENSOR_RESET;
|
||||||
this->mark_failed();
|
this->mark_failed();
|
||||||
}
|
}
|
||||||
@ -157,16 +157,14 @@ void BMP3XXComponent::dump_config() {
|
|||||||
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||||
break;
|
break;
|
||||||
case ERROR_WRONG_CHIP_ID:
|
case ERROR_WRONG_CHIP_ID:
|
||||||
ESP_LOGE(
|
ESP_LOGE(TAG, "Wrong chip ID (reported id: 0x%X) - please check if you are really using a BMP 388 or BMP 390",
|
||||||
TAG,
|
this->chip_id_.reg);
|
||||||
"BMP3XX has wrong chip ID (reported id: 0x%X) - please check if you are really using a BMP 388 or BMP 390",
|
|
||||||
this->chip_id_.reg);
|
|
||||||
break;
|
break;
|
||||||
case ERROR_SENSOR_RESET:
|
case ERROR_SENSOR_RESET:
|
||||||
ESP_LOGE(TAG, "BMP3XX failed to reset");
|
ESP_LOGE(TAG, "Failed to reset");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ESP_LOGE(TAG, "BMP3XX error code %d", (int) this->error_code_);
|
ESP_LOGE(TAG, "Error code %d", (int) this->error_code_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ESP_LOGCONFIG(TAG, " IIR Filter: %s", LOG_STR_ARG(iir_filter_to_str(this->iir_filter_)));
|
ESP_LOGCONFIG(TAG, " IIR Filter: %s", LOG_STR_ARG(iir_filter_to_str(this->iir_filter_)));
|
||||||
@ -186,7 +184,7 @@ inline uint8_t oversampling_to_time(Oversampling over_sampling) { return (1 << u
|
|||||||
|
|
||||||
void BMP3XXComponent::update() {
|
void BMP3XXComponent::update() {
|
||||||
// Enable sensor
|
// Enable sensor
|
||||||
ESP_LOGV(TAG, "Sending conversion request...");
|
ESP_LOGV(TAG, "Sending conversion request");
|
||||||
float meas_time = 1.0f;
|
float meas_time = 1.0f;
|
||||||
// Ref: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf 3.9.2
|
// Ref: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf 3.9.2
|
||||||
meas_time += 2.02f * oversampling_to_time(this->temperature_oversampling_) + 0.163f;
|
meas_time += 2.02f * oversampling_to_time(this->temperature_oversampling_) + 0.163f;
|
||||||
@ -296,7 +294,7 @@ bool BMP3XXComponent::get_pressure(float &pressure) {
|
|||||||
bool BMP3XXComponent::get_measurements(float &temperature, float &pressure) {
|
bool BMP3XXComponent::get_measurements(float &temperature, float &pressure) {
|
||||||
// Check if a measurement is ready
|
// Check if a measurement is ready
|
||||||
if (!data_ready()) {
|
if (!data_ready()) {
|
||||||
ESP_LOGD(TAG, "BMP3XX Get measurement - data not ready skipping update");
|
ESP_LOGD(TAG, "Get measurement - data not ready skipping update");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user