mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-07 19:24:01 +02:00
Formatting hex numbers
This commit is contained in:
parent
1e65dd7760
commit
bb24a7fbbc
1 changed files with 4 additions and 0 deletions
|
@ -190,6 +190,10 @@ int retardedACLSearch(const uint8_t *uid, uint8_t length, const struct ACLdataBr
|
||||||
void serialWriteUIDHex(const uint8_t *uid, uint8_t length)
|
void serialWriteUIDHex(const uint8_t *uid, uint8_t length)
|
||||||
{
|
{
|
||||||
for (int i=0; i<length; i++) {
|
for (int i=0; i<length; i++) {
|
||||||
|
// why the fuck doesn't it have printf by default?
|
||||||
|
if (uid[i] < 0x10) {
|
||||||
|
comSerial.print("0");
|
||||||
|
}
|
||||||
comSerial.print(uid[i], HEX);
|
comSerial.print(uid[i], HEX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue