1
0
Fork 0

Compare commits

..

No commits in common. "d38b534bbe78453198bc9716706118782bda31c6" and "5618f52a0e444866ac6617b06333fe0a8b72fae3" have entirely different histories.

View file

@ -100,15 +100,6 @@ bool RFID::programTag(Com::TagInfoRecord *tagToProgram) {
Serial.println("Failed to program tag."); Serial.println("Failed to program tag.");
return false; return false;
} }
// Programming succeeded, update the tracked ID of the tag.
for (uidNode* node = activeTags; node; node = node->next) {
// The protocol does not support UIDs other than 4 bytes, so assume it
// is the case here directly.
if ( *(uint32_t*)(node->uid.uidByte) == tagToProgram->uid)
node->tag_ID = tagToProgram->figId;
}
return true; return true;
} }
@ -170,8 +161,7 @@ bool RFID::writeBlock(MFRC522Constants::Uid &uidToRead, byte blockAddr, uint8_t
return false; return false;
} }
// Take into account the two bytes used only for the read commands. byte size = sizeof(comData);
byte size = sizeof(comData) - 2;
for (byte& bufferByte: comData) for (byte& bufferByte: comData)
bufferByte = 0; bufferByte = 0;