mirror of
https://github.com/esphome/esphome.git
synced 2025-03-29 14:08:14 +00:00
Update mcp4461_output.cpp
This commit is contained in:
parent
0b1a5fdeb8
commit
59ecddfe2a
@ -31,14 +31,16 @@ void Mcp4461Wiper::disable_wiper() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mcp4461Wiper::increase_wiper() {
|
void Mcp4461Wiper::increase_wiper() {
|
||||||
|
if (this->state_ == 0.256) { return; }
|
||||||
if (this->parent_->increase_wiper_(this->wiper_)) {
|
if (this->parent_->increase_wiper_(this->wiper_)) {
|
||||||
this->state_ = this->state_ + 1.0;
|
this->state_ = this->state_ + 0.001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mcp4461Wiper::decrease_wiper() {
|
void Mcp4461Wiper::decrease_wiper() {
|
||||||
|
if (this->state_ == 0.000) { return; }
|
||||||
if (this->parent_->decrease_wiper_(this->wiper_)) {
|
if (this->parent_->decrease_wiper_(this->wiper_)) {
|
||||||
this->state_ = this->state_ - 1.0;
|
this->state_ = this->state_ - 0.001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user