mirror of
https://github.com/esphome/esphome.git
synced 2025-01-20 19:36:00 +01:00
Fix UUID displaying incorrectly in BLE Tracker logs (#4187)
This commit is contained in:
parent
573ea55187
commit
8b06135b41
1 changed files with 2 additions and 2 deletions
|
@ -601,9 +601,9 @@ std::string ESPBTUUID::to_string() const {
|
||||||
default:
|
default:
|
||||||
case ESP_UUID_LEN_128:
|
case ESP_UUID_LEN_128:
|
||||||
std::string buf;
|
std::string buf;
|
||||||
for (int8_t i = 15; i >= 0; i--) {
|
for (uint8_t i = 0; i < 16; i++) {
|
||||||
buf += str_snprintf("%02X", 2, this->uuid_.uuid.uuid128[i]);
|
buf += str_snprintf("%02X", 2, this->uuid_.uuid.uuid128[i]);
|
||||||
if (i == 6 || i == 8 || i == 10 || i == 12)
|
if (i == 3 || i == 5 || i == 7 || i == 9)
|
||||||
buf += "-";
|
buf += "-";
|
||||||
}
|
}
|
||||||
return buf;
|
return buf;
|
||||||
|
|
Loading…
Reference in a new issue