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

Update esphome/components/mcp4461/output/mcp4461_output.cpp

Co-authored-by: Djordje Mandic <6750655+DjordjeMandic@users.noreply.github.com>
This commit is contained in:
Oliver Kleinecke 2025-02-03 12:15:47 +01:00 committed by GitHub
parent ad865415e9
commit 1b4f0f4623
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,7 @@ void Mcp4461Wiper::write_state(float state) {
const float max_taps = 256.0;
state = state * 1000.0;
if (state > max_taps) {
ESP_LOGW(TAG, "Cannot set taps > 0.256 for wiper %d, clamping to 0.256!", this->wiper_);
ESP_LOGW(TAG, "Cannot set taps > 0.256 for wiper %" PRIu8 ", clamping to 0.256!", static_cast<uint8_t>(this->wiper_));
state = 256.0;
}
uint16_t taps;