[sdp3x] Remove redundant "sdp3x" from log messages (#8969)

This commit is contained in:
Keith Burzinski 2025-06-03 15:43:14 -05:00 committed by GitHub
parent d4cea84b1b
commit e62d8bfabe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,31 +17,31 @@ static const uint16_t SDP3X_STOP_MEAS = 0x3FF9;
void SDP3XComponent::update() { this->read_pressure_(); } void SDP3XComponent::update() { this->read_pressure_(); }
void SDP3XComponent::setup() { void SDP3XComponent::setup() {
ESP_LOGD(TAG, "Setting up SDP3X..."); ESP_LOGCONFIG(TAG, "Running setup");
if (!this->write_command(SDP3X_STOP_MEAS)) { if (!this->write_command(SDP3X_STOP_MEAS)) {
ESP_LOGW(TAG, "Stop SDP3X failed!"); // This sometimes fails for no good reason ESP_LOGW(TAG, "Stop failed"); // This sometimes fails for no good reason
} }
if (!this->write_command(SDP3X_SOFT_RESET)) { if (!this->write_command(SDP3X_SOFT_RESET)) {
ESP_LOGW(TAG, "Soft Reset SDP3X failed!"); // This sometimes fails for no good reason ESP_LOGW(TAG, "Soft Reset failed"); // This sometimes fails for no good reason
} }
this->set_timeout(20, [this] { this->set_timeout(20, [this] {
if (!this->write_command(SDP3X_READ_ID1)) { if (!this->write_command(SDP3X_READ_ID1)) {
ESP_LOGE(TAG, "Read ID1 SDP3X failed!"); ESP_LOGE(TAG, "Read ID1 failed");
this->mark_failed(); this->mark_failed();
return; return;
} }
if (!this->write_command(SDP3X_READ_ID2)) { if (!this->write_command(SDP3X_READ_ID2)) {
ESP_LOGE(TAG, "Read ID2 SDP3X failed!"); ESP_LOGE(TAG, "Read ID2 failed");
this->mark_failed(); this->mark_failed();
return; return;
} }
uint16_t data[6]; uint16_t data[6];
if (!this->read_data(data, 6)) { if (!this->read_data(data, 6)) {
ESP_LOGE(TAG, "Read ID SDP3X failed!"); ESP_LOGE(TAG, "Read ID failed");
this->mark_failed(); this->mark_failed();
return; return;
} }
@ -79,18 +79,18 @@ void SDP3XComponent::setup() {
} }
if (!this->write_command(measurement_mode_ == DP_AVG ? SDP3X_START_DP_AVG : SDP3X_START_MASS_FLOW_AVG)) { if (!this->write_command(measurement_mode_ == DP_AVG ? SDP3X_START_DP_AVG : SDP3X_START_MASS_FLOW_AVG)) {
ESP_LOGE(TAG, "Start Measurements SDP3X failed!"); ESP_LOGE(TAG, "Start Measurements failed");
this->mark_failed(); this->mark_failed();
return; return;
} }
ESP_LOGCONFIG(TAG, "SDP3X started!"); ESP_LOGCONFIG(TAG, "started");
}); });
} }
void SDP3XComponent::dump_config() { void SDP3XComponent::dump_config() {
LOG_SENSOR(" ", "SDP3X", this); LOG_SENSOR(" ", "SDP3X", this);
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGE(TAG, " Connection with SDP3X failed!"); ESP_LOGE(TAG, " Connection with failed");
} }
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }
@ -98,7 +98,7 @@ void SDP3XComponent::dump_config() {
void SDP3XComponent::read_pressure_() { void SDP3XComponent::read_pressure_() {
uint16_t data[3]; uint16_t data[3];
if (!this->read_data(data, 3)) { if (!this->read_data(data, 3)) {
ESP_LOGW(TAG, "Couldn't read SDP3X data!"); ESP_LOGW(TAG, "Couldn't read data");
this->status_set_warning(); this->status_set_warning();
return; return;
} }