mirror of
https://github.com/esphome/esphome.git
synced 2025-03-26 04:28:17 +00:00
Update mcp4461.cpp
This commit is contained in:
parent
09d33c1bd1
commit
c4f5a84bf2
@ -47,14 +47,16 @@ static const LogString *mcp4461_get_message_string_(int status) {
|
|||||||
switch (status) {
|
switch (status) {
|
||||||
case Mcp4461Component::MCP4461_STATUS_I2C_ERROR:
|
case Mcp4461Component::MCP4461_STATUS_I2C_ERROR:
|
||||||
return LOG_STR("I2C error - communication with MCP4461 failed!");
|
return LOG_STR("I2C error - communication with MCP4461 failed!");
|
||||||
case Mcp4461Component::ENS210_STATUS_CRC_ERROR:
|
case Mcp4461Component::MCP4461_STATUS_REGISTER_INVALID:
|
||||||
return LOG_STR("CRC error");
|
return LOG_STR("Invalid status register value - bits 1,7 or 8 are 0");
|
||||||
case Mcp4461Component::ENS210_STATUS_INVALID:
|
case Mcp4461Component::MCP4461_VALUE_INVALID:
|
||||||
return LOG_STR("Invalid data");
|
return LOG_STR("Invalid value for wiper given");
|
||||||
case Mcp4461Component::ENS210_STATUS_OK:
|
case Mcp4461Component:::MCP4461_STATUS_OK:
|
||||||
return LOG_STR("Status OK");
|
return LOG_STR("Status OK");
|
||||||
case Mcp4461Component::ENS210_WRONG_CHIP_ID:
|
case Mcp4461Component::MCP4461_STATUS_WRITE_PROTECTED:
|
||||||
return LOG_STR("ENS210 has wrong chip ID! Is it a ENS210?");
|
return LOG_STR("MCP4461 is write protected. Setting nonvolatile wipers/eeprom values is prohibited.");
|
||||||
|
case Mcp4461Component::MCP4461_STATUS_WIPER_LOCKED:
|
||||||
|
return LOG_STR("MCP4461 Wiper is locked using WiperLock-technology. All actions on this wiper are prohibited.");
|
||||||
default:
|
default:
|
||||||
return LOG_STR("Unknown");
|
return LOG_STR("Unknown");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user