mirror of
https://github.com/esphome/esphome.git
synced 2025-04-08 20:00:27 +01:00
Update mcp4461.cpp
This commit is contained in:
parent
97f33e1b09
commit
6b60e8dc9e
@ -123,7 +123,7 @@ uint8_t Mcp4461Component::get_wiper_address_(uint8_t wiper) {
|
|||||||
|
|
||||||
uint16_t Mcp4461Component::get_wiper_level(Mcp4461WiperIdx wiper) {
|
uint16_t Mcp4461Component::get_wiper_level(Mcp4461WiperIdx wiper) {
|
||||||
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
|
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
|
||||||
if (!this->reg_[wiper_idx].enabled) {
|
if (!(this->reg_[wiper_idx].enabled)) {
|
||||||
ESP_LOGW(TAG, "reading from disabled volatile wiper %" PRIu8 ", returning 0", wiper_idx);
|
ESP_LOGW(TAG, "reading from disabled volatile wiper %" PRIu8 ", returning 0", wiper_idx);
|
||||||
return static_cast<uint16_t>(0);
|
return static_cast<uint16_t>(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user