1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-24 03:28:20 +00:00

Update mcp4461_output.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-09 19:35:19 +01:00 committed by GitHub
parent a57fc77327
commit 9fd850d3e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,20 +15,18 @@ void Mcp4461Wiper::write_state(float state) {
}
}
float Mcp4461Wiper::read_state() { return (static_cast<float>(this->parent_->get_wiper_level_(this->wiper_)) / 1000.0); }
float Mcp4461Wiper::read_state() {
return (static_cast<float>(this->parent_->get_wiper_level_(this->wiper_)) / 1000.0);
}
float Mcp4461Wiper::update_state() {
this->state_ = this->read_state();
return this->state_;
}
void Mcp4461Wiper::enable_wiper() {
this->parent_->enable_wiper_(this->wiper_);
}
void Mcp4461Wiper::enable_wiper() { this->parent_->enable_wiper_(this->wiper_); }
void Mcp4461Wiper::disable_wiper() {
this->parent_->disable_wiper_(this->wiper_);
}
void Mcp4461Wiper::disable_wiper() { this->parent_->disable_wiper_(this->wiper_); }
void Mcp4461Wiper::increase_wiper() {
if (this->parent_->increase_wiper_(this->wiper_)) {
@ -42,13 +40,9 @@ void Mcp4461Wiper::decrease_wiper() {
}
}
void Mcp4461Wiper::enable_terminal(char terminal) {
this->parent_->enable_terminal_(this->wiper_, terminal);
}
void Mcp4461Wiper::enable_terminal(char terminal) { this->parent_->enable_terminal_(this->wiper_, terminal); }
void Mcp4461Wiper::disable_terminal(char terminal) {
this->parent_->disable_terminal_(this->wiper_, terminal);
}
void Mcp4461Wiper::disable_terminal(char terminal) { this->parent_->disable_terminal_(this->wiper_, terminal); }
} // namespace mcp4461
} // namespace esphome