1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-15 23:30:28 +01:00

Update mcp4461_output.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-16 14:53:47 +01:00 committed by GitHub
parent a6b7fd5a69
commit 0b0d7515be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,14 +38,14 @@ void Mcp4461Wiper::turn_off() { this->parent_->disable_wiper_(this->wiper_); }
void Mcp4461Wiper::increase_wiper() {
if (this->parent_->increase_wiper_(this->wiper_)) {
this->state_ = this->update_state();
ESP_LOGV(TAG, "Increased wiper %d to %" PRIu16 "", this->wiper_, static_cast<uint16_t>(this->state_ * 256));
ESP_LOGV(TAG, "Increased wiper %d to %" PRIu16 "", this->wiper_, static_cast<uint16_t>(roundf(this->state_ * 256)));
}
}
void Mcp4461Wiper::decrease_wiper() {
if (this->parent_->decrease_wiper_(this->wiper_)) {
this->state_ = this->update_state();
ESP_LOGV(TAG, "Decreased wiper %d to %" PRIu16 "", this->wiper_, static_cast<uint16_t>(this->state_ * 256));
ESP_LOGV(TAG, "Decreased wiper %d to %" PRIu16 "", this->wiper_, static_cast<uint16_t>(roundf(this->state_ * 256)));
}
}