mirror of
https://github.com/esphome/esphome.git
synced 2025-04-12 22:00:30 +01:00
Update mcp4461.cpp
This commit is contained in:
parent
01cc629193
commit
d2ba3eef3a
@ -334,6 +334,7 @@ void Mcp4461Component::disable_wiper(Mcp4461WiperIdx wiper) {
|
||||
ESP_LOGE(TAG, "%s", LOG_STR_ARG(mcp4461_get_message_string_(this->error_code_)));
|
||||
return;
|
||||
}
|
||||
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
|
||||
if (!(this->reg_[wiper_idx].enabled)) {
|
||||
ESP_LOGW(TAG, "%s", LOG_STR_ARG(mcp4461_get_message_string_(MCP4461_WIPER_DISABLED)));
|
||||
return;
|
||||
@ -342,7 +343,6 @@ void Mcp4461Component::disable_wiper(Mcp4461WiperIdx wiper) {
|
||||
ESP_LOGW(TAG, "%s", LOG_STR_ARG(mcp4461_get_message_string_(MCP4461_WIPER_LOCKED)));
|
||||
return;
|
||||
}
|
||||
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
|
||||
ESP_LOGV(TAG, "Disabling wiper %" PRIu8, wiper_idx);
|
||||
this->reg_[wiper_idx].terminal_hw = false;
|
||||
this->update_ = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user