mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 06:54:52 +01:00
Update esphome/components/gp8211/gp8211.cpp
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
fa5a027946
commit
d074bc2819
1 changed files with 1 additions and 2 deletions
|
@ -9,8 +9,7 @@ static const char *const TAG = "gp8211";
|
|||
static const uint8_t RANGE_REGISTER = 0x01;
|
||||
|
||||
void GP8211::setup() {
|
||||
uint8_t voltage_setting = (this->voltage_ == GP8211_VOLTAGE_10V) ? 0x77 : 0x55;
|
||||
this->write_register(RANGE_REGISTER, &voltage_setting, 1);
|
||||
this->write_register(RANGE_REGISTER, &this->voltage_, 1);
|
||||
}
|
||||
|
||||
void GP8211::dump_config() {
|
||||
|
|
Loading…
Reference in a new issue