mirror of
https://github.com/esphome/esphome.git
synced 2025-04-04 09:50:29 +01:00
Update mcp4461_output.h
This commit is contained in:
parent
d82b93d57a
commit
12d50f9e8a
@ -18,9 +18,10 @@ class Mcp4461Wiper : public output::FloatOutput {
|
|||||||
terminal_a_(terminal_a),
|
terminal_a_(terminal_a),
|
||||||
terminal_b_(terminal_b),
|
terminal_b_(terminal_b),
|
||||||
terminal_w_(terminal_w) {
|
terminal_w_(terminal_w) {
|
||||||
|
uint8_t wiper_idx = static_cast<uint8_t>(wiper);
|
||||||
// update wiper connection state
|
// update wiper connection state
|
||||||
if (!enable && wiper < 4) {
|
if (!enable && wiper_idx < 4) {
|
||||||
parent->reg_[wiper].enabled = false;
|
parent->reg_[wiper_idx].enabled = false;
|
||||||
parent->disable_terminal(wiper, 'h');
|
parent->disable_terminal(wiper, 'h');
|
||||||
}
|
}
|
||||||
if (!terminal_a && wiper < 4)
|
if (!terminal_a && wiper < 4)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user