mirror of
https://github.com/esphome/esphome.git
synced 2025-03-13 22:28:14 +00:00
Update mcp4461.cpp
This commit is contained in:
parent
a3d3beca14
commit
69df86b340
@ -46,23 +46,23 @@ void Mcp4461Component::begin_() {
|
||||
// Converts a status to a human readable string
|
||||
static const LogString *mcp4461_get_message_string(int status) {
|
||||
switch (status) {
|
||||
case this->ErrorCode::MCP4461_STATUS_I2C_ERROR:
|
||||
case Mcp4461Component::MCP4461_STATUS_I2C_ERROR:
|
||||
return LOG_STR("I2C error - communication with MCP4461 failed!");
|
||||
case this->ErrorCode::MCP4461_STATUS_REGISTER_ERROR:
|
||||
case Mcp4461Component::MCP4461_STATUS_REGISTER_ERROR:
|
||||
return LOG_STR("Status register could not be read");
|
||||
case MCP4461_STATUS_REGISTER_INVALID:
|
||||
case Mcp4461Component::MCP4461_STATUS_REGISTER_INVALID:
|
||||
return LOG_STR("Invalid status register value - bits 1,7 or 8 are 0");
|
||||
case MCP4461_VALUE_INVALID:
|
||||
case Mcp4461Component::MCP4461_VALUE_INVALID:
|
||||
return LOG_STR("Invalid value for wiper given");
|
||||
case MCP4461_WRITE_PROTECTED:
|
||||
case Mcp4461Component::MCP4461_WRITE_PROTECTED:
|
||||
return LOG_STR("MCP4461 is write protected. Setting nonvolatile wipers/eeprom values is prohibited.");
|
||||
case MCP4461_WIPER_ENABLED:
|
||||
case Mcp4461Component::MCP4461_WIPER_ENABLED:
|
||||
return LOG_STR("MCP4461 Wiper is already enabled, ignoring cmd to enable.");
|
||||
case MCP4461_WIPER_DISABLED:
|
||||
case Mcp4461Component::MCP4461_WIPER_DISABLED:
|
||||
return LOG_STR("MCP4461 Wiper is disabled. All actions on this wiper are prohibited.");
|
||||
case MCP4461_WIPER_LOCKED:
|
||||
case Mcp4461Component::MCP4461_WIPER_LOCKED:
|
||||
return LOG_STR("MCP4461 Wiper is locked using WiperLock-technology. All actions on this wiper are prohibited.");
|
||||
case MCP4461_STATUS_OK:
|
||||
case Mcp4461Component::MCP4461_STATUS_OK:
|
||||
return LOG_STR("Status OK");
|
||||
default:
|
||||
return LOG_STR("Unknown");
|
||||
|
Loading…
x
Reference in New Issue
Block a user