mirror of
https://github.com/esphome/esphome.git
synced 2025-09-27 15:42:22 +01:00
Update mcp4461.cpp
This commit is contained in:
@@ -261,8 +261,7 @@ void Mcp4461Component::update_terminal_register(Mcp4461TerminalIdx terminal_conn
|
||||
if (terminal_data == 0) {
|
||||
return;
|
||||
}
|
||||
ESP_LOGV(TAG, "Got terminal register %" PRIu8 " data %0xh", static_cast<uint8_t>(terminal_connector),
|
||||
terminal_data);
|
||||
ESP_LOGV(TAG, "Got terminal register %" PRIu8 " data %0xh", static_cast<uint8_t>(terminal_connector), terminal_data);
|
||||
uint8_t wiper_index = 0;
|
||||
if (static_cast<uint8_t>(terminal_connector) == 1) {
|
||||
wiper_index = 2;
|
||||
@@ -284,8 +283,7 @@ void Mcp4461Component::set_terminal_register(Mcp4461TerminalIdx terminal_connect
|
||||
} else if (static_cast<uint8_t>(terminal_connector) == 1) {
|
||||
addr = static_cast<uint8_t>(Mcp4461Addresses::MCP4461_TCON1);
|
||||
} else {
|
||||
ESP_LOGW(TAG, "Invalid terminal connector id %" PRIu8 " specified",
|
||||
static_cast<uint8_t>(terminal_connector));
|
||||
ESP_LOGW(TAG, "Invalid terminal connector id %" PRIu8 " specified", static_cast<uint8_t>(terminal_connector));
|
||||
return;
|
||||
}
|
||||
this->mcp4461_write_(addr, data);
|
||||
|
Reference in New Issue
Block a user