From 5f08d59fedaa57f06bca73a4434bb9562f79e9a6 Mon Sep 17 00:00:00 2001 From: v1605 <55302877+v1605@users.noreply.github.com> Date: Sat, 16 Nov 2024 19:33:36 -0500 Subject: [PATCH] Update and rename TapToEsp32.ino to ZaparooEsp32.ino --- TapToEsp32.ino => ZaparooEsp32.ino | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename TapToEsp32.ino => ZaparooEsp32.ino (93%) diff --git a/TapToEsp32.ino b/ZaparooEsp32.ino similarity index 93% rename from TapToEsp32.ino rename to ZaparooEsp32.ino index 1196b99..77823c1 100644 --- a/TapToEsp32.ino +++ b/ZaparooEsp32.ino @@ -6,14 +6,14 @@ #include #include #include -#include -#include "TapToEsp32.hpp" +#include +#include "ZaparooEsp32.hpp" -//Config found in ReadTag.hpp +//Config found in .hpp file MFRC522 mfrc522(SS_PIN, RST_PIN); NfcAdapter nfc = NfcAdapter(&mfrc522); -TapToLaunchApi client; +ZaparooLaunchApi client; AudioOutputI2S* out; boolean wifiEnabled = false; String lastId=""; @@ -24,7 +24,7 @@ void setup() { setupPins(); #ifndef SERIAL_ONLY initWiFi(); - client.url(tapToUrl); + client.url(zaparooUrl); #endif SPI.begin(); // Init SPI bus mfrc522.PCD_Init(); // Init MFRC522 @@ -123,7 +123,7 @@ void playAudio(){ #endif } -bool sendTapTo(String& gamePath){ +bool send(String& gamePath){ if(!wifiEnabled) return true; int code = client.launch(gamePath); if(code > 0){ @@ -132,7 +132,7 @@ bool sendTapTo(String& gamePath){ return code == 0; } -bool sendTapToUid(String& uid){ +bool sendUid(String& uid){ if(!wifiEnabled) return true; int code = client.launchUid(uid); if(code > 0){ @@ -189,11 +189,11 @@ void loop(void) { } foundMessage = !payloadAsString.equalsIgnoreCase(""); if(foundMessage){ - if(sendTapTo(payloadAsString)){ + if(send(payloadAsString)){ Serial.print("SCAN\t" + payloadAsString + "\n"); Serial.flush(); successActions(); - } + } nfc.haltTag(); delay(900); } @@ -203,7 +203,7 @@ void loop(void) { String toSend = id; toSend.replace(" ", ""); toSend.toLowerCase(); - if(sendTapToUid(toSend)){ + if(sendUid(toSend)){ Serial.print("SCAN\tuid=" + toSend+ "\n"); Serial.flush(); successActions();