From 463e71fe1077b2ce7ffd05ecaae0b27b235223da Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 18 Jan 2024 21:01:53 +0100 Subject: [PATCH] rename nfc reader --- lib/NFC/src/NfcReader.cpp | 7 +++---- lib/NFC/src/{NfcReader.hpp => NfcReader.h} | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) rename lib/NFC/src/{NfcReader.hpp => NfcReader.h} (82%) diff --git a/lib/NFC/src/NfcReader.cpp b/lib/NFC/src/NfcReader.cpp index 23ea403..e019406 100644 --- a/lib/NFC/src/NfcReader.cpp +++ b/lib/NFC/src/NfcReader.cpp @@ -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); -} \ No newline at end of file +} diff --git a/lib/NFC/src/NfcReader.hpp b/lib/NFC/src/NfcReader.h similarity index 82% rename from lib/NFC/src/NfcReader.hpp rename to lib/NFC/src/NfcReader.h index aab376f..6fdd89b 100644 --- a/lib/NFC/src/NfcReader.hpp +++ b/lib/NFC/src/NfcReader.h @@ -5,8 +5,8 @@ ** NfcReader */ -#ifndef NFCREADER_HPP_ -#define NFCREADER_HPP_ +#ifndef NFCREADER_H +#define NFCREADER_H #include #include "MFRC522_I2C.h" @@ -25,4 +25,4 @@ class NfcReader { String uid; }; -#endif /* !NFCREADER_HPP_ */ +#endif /* !NFCREADER_H */