rename nfc reader

This commit is contained in:
Clement 2024-01-18 21:01:53 +01:00
parent 76ebc00763
commit 463e71fe10
2 changed files with 6 additions and 7 deletions

View File

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

View File

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