mirror of
https://github.com/esphome/esphome.git
synced 2025-04-08 20:00:27 +01:00
Update esphome/components/mcp4461/mcp4461.cpp
Co-authored-by: Djordje Mandic <6750655+DjordjeMandic@users.noreply.github.com>
This commit is contained in:
parent
e1f132681c
commit
8b42738618
@ -128,13 +128,7 @@ uint16_t Mcp4461Component::get_wiper_level(uint8_t wiper) {
|
|||||||
}
|
}
|
||||||
if (!this->read_byte_16(reg, &buf)) {
|
if (!this->read_byte_16(reg, &buf)) {
|
||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
if (wiper > 3) {
|
ESP_LOGW(TAG, "Error fetching %swiper %" PRIu8 " value", (wiper > 3) ? "nonvolatile " : "", wiper);
|
||||||
this->status_set_warning();
|
|
||||||
ESP_LOGW(TAG, "Error fetching nonvolatile wiper %d value", wiper);
|
|
||||||
} else {
|
|
||||||
this->status_set_warning();
|
|
||||||
ESP_LOGW(TAG, "Error fetching wiper %d value", wiper);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return buf;
|
return buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user