1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-10 21:00:31 +01:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-05 01:00:06 +01:00 committed by GitHub
parent b9a6869573
commit b3625ceb55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,7 +169,7 @@ void Mcp4461Component::set_wiper_level(Mcp4461WiperIdx wiper, uint16_t value) {
} }
if (!(this->reg_[wiper_idx].enabled)) { if (!(this->reg_[wiper_idx].enabled)) {
ESP_LOGW(TAG, "writing to disabled volatile wiper %" PRIu8 " is prohibited", wiper_idx); ESP_LOGW(TAG, "writing to disabled volatile wiper %" PRIu8 " is prohibited", wiper_idx);
return static_cast<uint16_t>(0); return;
} }
ESP_LOGV(TAG, "Setting MCP4461 wiper %" PRIu8 " to %" PRIu16 "!", wiper_idx, value); ESP_LOGV(TAG, "Setting MCP4461 wiper %" PRIu8 " to %" PRIu16 "!", wiper_idx, value);
this->reg_[wiper_idx].state = value; this->reg_[wiper_idx].state = value;