From 4a33b62ef2facc96581ffb58100be7a9126bda33 Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Thu, 20 Feb 2025 17:31:56 +0100 Subject: [PATCH] Update mcp4461.cpp --- esphome/components/mcp4461/mcp4461.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/esphome/components/mcp4461/mcp4461.cpp b/esphome/components/mcp4461/mcp4461.cpp index 25f187d672..eae9c30e97 100644 --- a/esphome/components/mcp4461/mcp4461.cpp +++ b/esphome/components/mcp4461/mcp4461.cpp @@ -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 Mcp4461Component::MCP4461_STATUS_I2C_ERROR: + case this->MCP4461_STATUS_I2C_ERROR: return LOG_STR("I2C error - communication with MCP4461 failed!"); - case Mcp4461Component::MCP4461_STATUS_REGISTER_ERROR: + case this->MCP4461_STATUS_REGISTER_ERROR: return LOG_STR("Status register could not be read"); - case Mcp4461Component::MCP4461_STATUS_REGISTER_INVALID: + case this->MCP4461_STATUS_REGISTER_INVALID: return LOG_STR("Invalid status register value - bits 1,7 or 8 are 0"); - case Mcp4461Component::MCP4461_VALUE_INVALID: + case this->MCP4461_VALUE_INVALID: return LOG_STR("Invalid value for wiper given"); - case Mcp4461Component::MCP4461_WRITE_PROTECTED: + case this->MCP4461_WRITE_PROTECTED: return LOG_STR("MCP4461 is write protected. Setting nonvolatile wipers/eeprom values is prohibited."); - case Mcp4461Component::MCP4461_WIPER_ENABLED: + case this->MCP4461_WIPER_ENABLED: return LOG_STR("MCP4461 Wiper is already enabled, ignoring cmd to enable."); - case Mcp4461Component::MCP4461_WIPER_DISABLED: + case this->MCP4461_WIPER_DISABLED: return LOG_STR("MCP4461 Wiper is disabled. All actions on this wiper are prohibited."); - case Mcp4461Component::MCP4461_WIPER_LOCKED: + case this->MCP4461_WIPER_LOCKED: return LOG_STR("MCP4461 Wiper is locked using WiperLock-technology. All actions on this wiper are prohibited."); - case Mcp4461Component::MCP4461_STATUS_OK: + case this->MCP4461_STATUS_OK: return LOG_STR("Status OK"); default: return LOG_STR("Unknown");