1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-15 06:15:47 +00:00

Combine code of xiaomi_miscale and xiaomi_miscale2 (#2266)

* Combine xiaomi_miscale and xiaomi_miscale2

* check if message contains impedance

* auto detect scale version

* remove xiaomi_miscale2

* fix lint errors

* Apply suggestions from code review

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Apply suggestions from code review on old code

* Fix clang-tidy warnings

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
Robert Resch
2021-09-22 12:12:55 +02:00
committed by GitHub
parent ed593544d8
commit f1364d4af4
8 changed files with 98 additions and 225 deletions

View File

@@ -380,8 +380,8 @@ bool ESPBTUUID::operator==(const ESPBTUUID &uuid) const {
}
return false;
}
esp_bt_uuid_t ESPBTUUID::get_uuid() { return this->uuid_; }
std::string ESPBTUUID::to_string() {
esp_bt_uuid_t ESPBTUUID::get_uuid() const { return this->uuid_; }
std::string ESPBTUUID::to_string() const {
char sbuf[64];
switch (this->uuid_.len) {
case ESP_UUID_LEN_16: