mirror of
https://github.com/esphome/esphome.git
synced 2025-09-27 07:32:22 +01:00
Update mcp4461.cpp
This commit is contained in:
@@ -312,8 +312,11 @@ void Mcp4461Component::enable_wiper_(Mcp4461WiperIdx wiper) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ESP_LOGV(TAG, "Enabling wiper %" PRIu8, wiper_idx);
|
ESP_LOGV(TAG, "Enabling wiper %" PRIu8, wiper_idx);
|
||||||
this->reg_[wiper_idx].terminal_hw = true;
|
this->reg_[wiper_idx].enabled = true;
|
||||||
this->reg_[wiper_idx].update_level = true;
|
if (wiper_idx < 4) {
|
||||||
|
this->reg_[wiper_idx].terminal_hw = true;
|
||||||
|
this->reg_[wiper_idx].update_terminal = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mcp4461Component::disable_wiper_(Mcp4461WiperIdx wiper) {
|
void Mcp4461Component::disable_wiper_(Mcp4461WiperIdx wiper) {
|
||||||
@@ -331,8 +334,11 @@ void Mcp4461Component::disable_wiper_(Mcp4461WiperIdx wiper) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
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].enabled = true;
|
||||||
this->reg_[wiper_idx].update_level = true;
|
if (wiper_idx < 4) {
|
||||||
|
this->reg_[wiper_idx].terminal_hw = true;
|
||||||
|
this->reg_[wiper_idx].update_terminal = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Mcp4461Component::increase_wiper_(Mcp4461WiperIdx wiper) {
|
bool Mcp4461Component::increase_wiper_(Mcp4461WiperIdx wiper) {
|
||||||
|
Reference in New Issue
Block a user