Skip to content

Commit

Permalink
Rename generateTag function to generateBlankTag for clarity; update r…
Browse files Browse the repository at this point in the history
…eferences in fastRx and buffer handling
  • Loading branch information
DanTheMan827 committed Jan 20, 2025
1 parent 6eaae8a commit b197004
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ntag215.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ function generateUid() {
* Generates a blank NTAG215 tag with a random UID.
* @returns {Uint8Array} - The generated tag.
*/
function generateTag() {
function generateBlankTag() {
var tag = new Uint8Array(572);

// Generate blank NTAG215 tags with random, but valid UID.
Expand Down Expand Up @@ -900,7 +900,7 @@ function fastRx(data) {

case COMMAND_CLEAR_SLOT: //Clear Slot <Slot>
slot = data[1];
tag = generateTag();
tag = generateBlankTag();
getTag(slot).set(tag);

if (currentTag == slot) {
Expand Down Expand Up @@ -1087,7 +1087,7 @@ if (typeof _NTAG215 !== "undefined") {

tag.set(buffer);
} else {
tag.set(generateTag());
tag.set(generateBlankTag());
}
}

Expand Down

0 comments on commit b197004

Please sign in to comment.