1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-15 07:08:20 +00:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-20 17:42:30 +01:00 committed by GitHub
parent fa23c3adc2
commit a3d3beca14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,9 +46,9 @@ void Mcp4461Component::begin_() {
// Converts a status to a human readable string // Converts a status to a human readable string
static const LogString *mcp4461_get_message_string(int status) { static const LogString *mcp4461_get_message_string(int status) {
switch (status) { switch (status) {
case MCP4461_STATUS_I2C_ERROR: case this->ErrorCode::MCP4461_STATUS_I2C_ERROR:
return LOG_STR("I2C error - communication with MCP4461 failed!"); return LOG_STR("I2C error - communication with MCP4461 failed!");
case MCP4461_STATUS_REGISTER_ERROR: case this->ErrorCode::MCP4461_STATUS_REGISTER_ERROR:
return LOG_STR("Status register could not be read"); return LOG_STR("Status register could not be read");
case MCP4461_STATUS_REGISTER_INVALID: case MCP4461_STATUS_REGISTER_INVALID:
return LOG_STR("Invalid status register value - bits 1,7 or 8 are 0"); return LOG_STR("Invalid status register value - bits 1,7 or 8 are 0");