mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Introduce "communication failed" log macro (#8939)
This commit is contained in:
@@ -73,7 +73,7 @@ void HMC5883LComponent::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "HMC5883L:");
|
||||
LOG_I2C_DEVICE(this);
|
||||
if (this->error_code_ == COMMUNICATION_FAILED) {
|
||||
ESP_LOGE(TAG, "Communication with HMC5883L failed!");
|
||||
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||
} else if (this->error_code_ == ID_REGISTERS) {
|
||||
ESP_LOGE(TAG, "The ID registers don't match - Is this really an HMC5883L?");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user