1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-24 11:38:23 +00:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-09 17:53:48 +01:00 committed by GitHub
parent 0609d6ed3d
commit 613bfa7ab1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -499,10 +499,6 @@ void Mcp4461Component::enable_terminal_(Mcp4461WiperIdx wiper, char terminal) {
return;
}
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
if (wiper_idx > 3) {
ESP_LOGV(TAG, "Cannot enable/disable terminals of nonvolatile wiper %" PRIu8 "", terminal, wiper_idx);
return;
}
ESP_LOGV(TAG, "Enabling terminal %c of wiper %" PRIu8 "", terminal, wiper_idx);
switch (terminal) {
case 'h':
@ -530,10 +526,6 @@ void Mcp4461Component::disable_terminal_(Mcp4461WiperIdx wiper, char terminal) {
return;
}
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
if (wiper_idx > 3) {
ESP_LOGV(TAG, "Cannot enable/disable terminals of nonvolatile wiper %" PRIu8 "", terminal, wiper_idx);
return;
}
ESP_LOGV(TAG, "Disabling terminal %c of wiper %" PRIu8 "", terminal, wiper_idx);
switch (terminal) {
case 'h':