mirror of
https://github.com/esphome/esphome.git
synced 2024-11-16 10:45:48 +01:00
Print BLE 128-bit UUIDs according to spec (#2061)
Since the iterator integer counts the bytes backwards we need to use the complement to 15.
This commit is contained in:
parent
237edd75d1
commit
c2637a76f7
@ -372,7 +372,7 @@ std::string ESPBTUUID::to_string() {
|
||||
for (int8_t i = 15; i >= 0; i--) {
|
||||
sprintf(bpos, "%02X", this->uuid_.uuid.uuid128[i]);
|
||||
bpos += 2;
|
||||
if (i == 3 || i == 5 || i == 7 || i == 9)
|
||||
if (i == 6 || i == 8 || i == 10 || i == 12)
|
||||
sprintf(bpos++, "-");
|
||||
}
|
||||
sbuf[47] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user