1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-24 11:38:23 +00:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-09 18:07:54 +01:00 committed by GitHub
parent f554500a39
commit 8731957b6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,10 +131,11 @@ void Mcp4461Component::loop() {
this->reg_[i].update_level = false;
if (this->reg_[i].update_terminal) {
// set terminal register changes
Mcp4461TerminalIdx terminal_connector;
if (i < 2) {
Mcp4461TerminalIdx terminal_connector = Mcp4461TerminalIdx::MCP4461_TERMINAL_0;
terminal_connector = Mcp4461TerminalIdx::MCP4461_TERMINAL_0;
}
if (i > 1) {
else {
terminal_connector = Mcp4461TerminalIdx::MCP4461_TERMINAL_1;
}
uint8_t new_terminal_value = this->calc_terminal_connector_byte_(terminal_connector);