feat: main-algo #16

Merged
Clement merged 10 commits from feat/main-algo into develop 2024-01-26 08:47:26 +00:00
2 changed files with 6 additions and 7 deletions
Showing only changes of commit 463e71fe10 - Show all commits

View File

@ -5,7 +5,7 @@
** NfcReader
*/
#include "NfcReader.hpp"
#include "NfcReader.h"
NfcReader::NfcReader(int i2c_adress)
{
@ -20,7 +20,6 @@ String NfcReader::ReadNfc()
this->uid.clear();
if (!this->mfrc522->PICC_IsNewCardPresent() ||
!this->mfrc522->PICC_ReadCardSerial()) {
delay(200);
return "0";
}
for (unsigned int i = 0; i < this->mfrc522->uid.size; i++) {
@ -28,8 +27,8 @@ String NfcReader::ReadNfc()
this->uid += '0';
this->uid += String(this->mfrc522->uid.uidByte[i], HEX);
} else {
this->uid += String(this->mfrc522->uid.uidByte[i], HEX);
this->uid += String(this->mfrc522->uid.uidByte[i], HEX);
}
}
return (this->uid);
}
}

View File

@ -5,8 +5,8 @@
** NfcReader
*/
#ifndef NFCREADER_HPP_
#define NFCREADER_HPP_
#ifndef NFCREADER_H
#define NFCREADER_H
#include <M5Stack.h>
#include "MFRC522_I2C.h"
@ -25,4 +25,4 @@ class NfcReader {
String uid;
};
#endif /* !NFCREADER_HPP_ */
#endif /* !NFCREADER_H */