NFC: Correcting bug & adding in config

This commit is contained in:
Guska 2024-01-19 11:35:21 +01:00
parent cada4d6e02
commit 4e8e916e5e
3 changed files with 3 additions and 18 deletions

View File

@ -4,6 +4,7 @@
; Hardware Serial baud rate ; Hardware Serial baud rate
; Also available in the code as `MONITOR_SPEED` ; Also available in the code as `MONITOR_SPEED`
monitor_speed = 115200 monitor_speed = 115200
NFC_ADDR = 0x28
; Software Config ; Software Config
; note: additionnal flags are added by Platform.io (see total amount in `.vscode/c_cpp_properties.json` in the `defines` section) ; note: additionnal flags are added by Platform.io (see total amount in `.vscode/c_cpp_properties.json` in the `defines` section)

View File

@ -1,11 +1,4 @@
/* #include "NfcReader.h"
** EPITECH PROJECT, 2024
** T-IOT-901_convoyor
** File description:
** NfcReader
*/
#include "NfcReader.hpp"
NfcReader::NfcReader(int i2c_adress) NfcReader::NfcReader(int i2c_adress)
{ {
@ -13,8 +6,6 @@ NfcReader::NfcReader(int i2c_adress)
this->mfrc522->PCD_Init(); this->mfrc522->PCD_Init();
} }
NfcReader::~NfcReader() {}
String NfcReader::ReadNfc() String NfcReader::ReadNfc()
{ {
this->uid.clear(); this->uid.clear();

View File

@ -1,10 +1,3 @@
/*
** EPITECH PROJECT, 2024
** T-IOT-901_convoyor
** File description:
** NfcReader
*/
#ifndef NFCREADER_HPP_ #ifndef NFCREADER_HPP_
#define NFCREADER_HPP_ #define NFCREADER_HPP_
@ -15,7 +8,7 @@
class NfcReader { class NfcReader {
public: public:
NfcReader(int i2c_adress); NfcReader(int i2c_adress);
~NfcReader(); ~NfcReader() = default;
String ReadNfc(); String ReadNfc();