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