mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 07:24:54 +01:00
formatting
This commit is contained in:
parent
74ca4e04bb
commit
f448db79d5
3 changed files with 62 additions and 65 deletions
|
@ -158,18 +158,13 @@ void KT0803Component::update() {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void KT0803Component::loop() {
|
void KT0803Component::loop() {}
|
||||||
}
|
|
||||||
|
|
||||||
// config
|
// config
|
||||||
|
|
||||||
void KT0803Component::set_chip_id(ChipId value) {
|
void KT0803Component::set_chip_id(ChipId value) { this->chip_id_ = value; }
|
||||||
this->chip_id_ = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChipId KT0803Component::get_chip_id() {
|
ChipId KT0803Component::get_chip_id() { return this->chip_id_; }
|
||||||
return this->chip_id_;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string KT0803Component::get_chip_string() const {
|
std::string KT0803Component::get_chip_string() const {
|
||||||
switch (this->chip_id_) {
|
switch (this->chip_id_) {
|
||||||
|
@ -198,7 +193,9 @@ void KT0803Component::set_frequency(float value) {
|
||||||
this->state_.CHSEL0 = (uint8_t) ((ch >> 0) & 0x01);
|
this->state_.CHSEL0 = (uint8_t) ((ch >> 0) & 0x01);
|
||||||
this->write_reg_(0x00);
|
this->write_reg_(0x00);
|
||||||
this->write_reg_(0x01);
|
this->write_reg_(0x01);
|
||||||
|
if (this->chip_id_ != ChipId::KT0803) {
|
||||||
this->write_reg_(0x02);
|
this->write_reg_(0x02);
|
||||||
|
}
|
||||||
|
|
||||||
this->publish_frequency();
|
this->publish_frequency();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue