From 970d0b0d574e91aa587cc0d57092630c1135ff75 Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Sun, 16 Feb 2025 14:54:18 +0100 Subject: [PATCH] Update mcp4461_output.cpp --- esphome/components/mcp4461/output/mcp4461_output.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/mcp4461/output/mcp4461_output.cpp b/esphome/components/mcp4461/output/mcp4461_output.cpp index 212a02ebf3..42eb766b85 100644 --- a/esphome/components/mcp4461/output/mcp4461_output.cpp +++ b/esphome/components/mcp4461/output/mcp4461_output.cpp @@ -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(roundf(this->state_ * 256))); + ESP_LOGV(TAG, "Increased wiper %d to %" PRIu16 "", this->wiper_, static_cast(std::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(roundf(this->state_ * 256))); + ESP_LOGV(TAG, "Decreased wiper %d to %" PRIu16 "", this->wiper_, static_cast(std::roundf(this->state_ * 256))); } }