mirror of
https://github.com/esphome/esphome.git
synced 2026-02-27 17:34:22 -07:00
[nfc] Use stack-based hex formatting in pn7150/pn7160 components
This commit is contained in:
@@ -6,8 +6,7 @@ namespace nfc {
|
||||
|
||||
void NfcOnTagTrigger::process(const std::unique_ptr<NfcTag> &tag) {
|
||||
char uid_buf[FORMAT_UID_BUFFER_SIZE];
|
||||
format_uid_to(uid_buf, tag->get_uid());
|
||||
this->trigger(std::string(uid_buf), *tag);
|
||||
this->trigger(std::string(format_uid_to(uid_buf, tag->get_uid())), *tag);
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
|
||||
@@ -26,8 +26,7 @@ void NfcTagBinarySensor::dump_config() {
|
||||
}
|
||||
if (!this->uid_.empty()) {
|
||||
char uid_buf[FORMAT_BYTES_BUFFER_SIZE];
|
||||
format_bytes_to(uid_buf, this->uid_);
|
||||
ESP_LOGCONFIG(TAG, " Tag UID: %s", uid_buf);
|
||||
ESP_LOGCONFIG(TAG, " Tag UID: %s", format_bytes_to(uid_buf, this->uid_));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user