mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 06:54:52 +01:00
formatting
This commit is contained in:
parent
74ca4e04bb
commit
f448db79d5
3 changed files with 62 additions and 65 deletions
|
@ -148,28 +148,23 @@ void KT0803Component::update() {
|
|||
this->publish_pw_ok();
|
||||
this->publish_slncid();
|
||||
}
|
||||
/*
|
||||
/*
|
||||
for (size_t addr = 0; addr < 0x2F; addr++) {
|
||||
uint8_t c;
|
||||
if (i2c::ERROR_OK == this->read_register(addr, &c, 1, false)) {
|
||||
ESP_LOGV(TAG, "update register[%02X]: %02X", addr, c);
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
}
|
||||
|
||||
void KT0803Component::loop() {
|
||||
}
|
||||
void KT0803Component::loop() {}
|
||||
|
||||
// config
|
||||
|
||||
void KT0803Component::set_chip_id(ChipId value) {
|
||||
this->chip_id_ = value;
|
||||
}
|
||||
void KT0803Component::set_chip_id(ChipId value) { this->chip_id_ = value; }
|
||||
|
||||
ChipId KT0803Component::get_chip_id() {
|
||||
return this->chip_id_;
|
||||
}
|
||||
ChipId KT0803Component::get_chip_id() { return this->chip_id_; }
|
||||
|
||||
std::string KT0803Component::get_chip_string() const {
|
||||
switch (this->chip_id_) {
|
||||
|
@ -198,7 +193,9 @@ void KT0803Component::set_frequency(float value) {
|
|||
this->state_.CHSEL0 = (uint8_t) ((ch >> 0) & 0x01);
|
||||
this->write_reg_(0x00);
|
||||
this->write_reg_(0x01);
|
||||
if (this->chip_id_ != ChipId::KT0803) {
|
||||
this->write_reg_(0x02);
|
||||
}
|
||||
|
||||
this->publish_frequency();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue