1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-13 22:30:31 +01:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-09 15:44:11 +01:00 committed by GitHub
parent 5a4eb4349e
commit 70b52466d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -134,9 +134,9 @@ void Mcp4461Component::loop() {
if (status_has_warning()) {
this->get_status_register();
}
if (this->update_) {
uint8_t i;
for (i = 0; i < 8; i++) {
uint8_t i;
for (i = 0; i < 8; i++) {
if (this->reg_[i].update) {
// set wiper i state if changed
if (this->reg_[i].state != this->read_wiper_level_(i)) {
this->write_wiper_level_(i, this->reg_[i].state);
@ -158,7 +158,7 @@ void Mcp4461Component::loop() {
}
}
}
this->update_ = false;
this->reg_[i].update = false;
}
}