mirror of
https://github.com/esphome/esphome.git
synced 2025-03-13 22:28:14 +00:00
Update mcp4461.cpp
This commit is contained in:
parent
387e55f2ad
commit
b6a27a70cc
@ -26,7 +26,7 @@ void Mcp4461Component::begin_() {
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
if (this->reg_[i].initial_value.has_value()) {
|
||||
uint16_t initial_state;
|
||||
initial_state = static_cast<uint16_t>(*this->reg_[i].initial_value * 1000.f);
|
||||
initial_state = static_cast<uint16_t>(*this->reg_[i].initial_value * 256.0f);
|
||||
this->write_wiper_level_(i, initial_state);
|
||||
}
|
||||
if (this->reg_[i].enabled) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user