mirror of
https://github.com/esphome/esphome.git
synced 2025-04-14 23:00:29 +01:00
Update mcp4461.cpp
This commit is contained in:
parent
b4e0aa00c8
commit
36ec387e23
@ -227,11 +227,11 @@ uint16_t Mcp4461Component::get_wiper_level(Mcp4461WiperIdx wiper) {
|
||||
ESP_LOGE(TAG, "%s", LOG_STR_ARG(mcp4461_get_message_string_(this->error_code_)));
|
||||
return 0;
|
||||
}
|
||||
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
|
||||
if (!(this->reg_[wiper_idx].enabled)) {
|
||||
ESP_LOGW(TAG, "%s", LOG_STR_ARG(mcp4461_get_message_string_(MCP4461_WIPER_DISABLED)));
|
||||
return 0;
|
||||
}
|
||||
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
|
||||
if (!(this->reg_[wiper_idx].enabled)) {
|
||||
ESP_LOGW(TAG, "reading from disabled volatile wiper %" PRIu8 ", returning 0", wiper_idx);
|
||||
return static_cast<uint16_t>(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user