mirror of
https://github.com/esphome/esphome.git
synced 2025-04-07 03:10:27 +01:00
Update mcp4461_output.cpp
This commit is contained in:
parent
b05b583843
commit
057be5a10a
@ -14,7 +14,8 @@ void Mcp4461Wiper::write_state(float state) {
|
|||||||
const float max_taps = 256.0;
|
const float max_taps = 256.0;
|
||||||
state = state * 1000.0;
|
state = state * 1000.0;
|
||||||
if (state > max_taps) {
|
if (state > max_taps) {
|
||||||
ESP_LOGW(TAG, "Cannot set taps > 0.256 for wiper %" PRIu8 ", clamping to 0.256!", static_cast<uint8_t>(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;
|
state = 256.0;
|
||||||
}
|
}
|
||||||
uint16_t taps;
|
uint16_t taps;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user