Enable RFID UID output and tidy car mass input
This commit is contained in:
@@ -11,8 +11,6 @@ void RFIDReader::begin() {
|
||||
bool RFIDReader::check() {
|
||||
if (!_rfid.PICC_IsNewCardPresent()) return false;
|
||||
if (!_rfid.PICC_ReadCardSerial()) return false;
|
||||
// _rfid.PICC_HaltA(); // stop the tag
|
||||
// _rfid.PCD_StopCrypto1(); // clear RC522 crypto
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,10 +29,10 @@ bool RFIDReader::matches(const byte* expectedUid, byte expectedSize) const {
|
||||
|
||||
void RFIDReader::printUID() const {
|
||||
Serial.println(F("RFID Tag UID:"));
|
||||
// for (byte i = 0; i < _rfid.uid.size; i++) {
|
||||
// Serial.print(_rfid.uid.uidByte[i] < 0x10 ? " 0" : " ");
|
||||
// Serial.print(_rfid.uid.uidByte[i], HEX);
|
||||
// }
|
||||
for (byte i = 0; i < _rfid.uid.size; i++) {
|
||||
Serial.print(_rfid.uid.uidByte[i] < 0x10 ? " 0" : " ");
|
||||
Serial.print(_rfid.uid.uidByte[i], HEX);
|
||||
}
|
||||
}
|
||||
|
||||
const byte* RFIDReader::getUID() const {
|
||||
|
||||
Reference in New Issue
Block a user