Skip to content

Commit 5f08d59

Browse files
authored
Update and rename TapToEsp32.ino to ZaparooEsp32.ino
1 parent f115afa commit 5f08d59

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

TapToEsp32.ino renamed to ZaparooEsp32.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
#include <AudioOutputI2S.h>
77
#include <AudioGeneratorMP3.h>
88
#include <LittleFS.h>
9-
#include <TapToLaunchApi.h>
10-
#include "TapToEsp32.hpp"
9+
#include <ZaparooLaunchApi.h>
10+
#include "ZaparooEsp32.hpp"
1111

12-
//Config found in ReadTag.hpp
12+
//Config found in .hpp file
1313

1414
MFRC522 mfrc522(SS_PIN, RST_PIN);
1515
NfcAdapter nfc = NfcAdapter(&mfrc522);
16-
TapToLaunchApi client;
16+
ZaparooLaunchApi client;
1717
AudioOutputI2S* out;
1818
boolean wifiEnabled = false;
1919
String lastId="";
@@ -24,7 +24,7 @@ void setup() {
2424
setupPins();
2525
#ifndef SERIAL_ONLY
2626
initWiFi();
27-
client.url(tapToUrl);
27+
client.url(zaparooUrl);
2828
#endif
2929
SPI.begin(); // Init SPI bus
3030
mfrc522.PCD_Init(); // Init MFRC522
@@ -123,7 +123,7 @@ void playAudio(){
123123
#endif
124124
}
125125

126-
bool sendTapTo(String& gamePath){
126+
bool send(String& gamePath){
127127
if(!wifiEnabled) return true;
128128
int code = client.launch(gamePath);
129129
if(code > 0){
@@ -132,7 +132,7 @@ bool sendTapTo(String& gamePath){
132132
return code == 0;
133133
}
134134

135-
bool sendTapToUid(String& uid){
135+
bool sendUid(String& uid){
136136
if(!wifiEnabled) return true;
137137
int code = client.launchUid(uid);
138138
if(code > 0){
@@ -189,11 +189,11 @@ void loop(void) {
189189
}
190190
foundMessage = !payloadAsString.equalsIgnoreCase("");
191191
if(foundMessage){
192-
if(sendTapTo(payloadAsString)){
192+
if(send(payloadAsString)){
193193
Serial.print("SCAN\t" + payloadAsString + "\n");
194194
Serial.flush();
195195
successActions();
196-
}
196+
}
197197
nfc.haltTag();
198198
delay(900);
199199
}
@@ -203,7 +203,7 @@ void loop(void) {
203203
String toSend = id;
204204
toSend.replace(" ", "");
205205
toSend.toLowerCase();
206-
if(sendTapToUid(toSend)){
206+
if(sendUid(toSend)){
207207
Serial.print("SCAN\tuid=" + toSend+ "\n");
208208
Serial.flush();
209209
successActions();

0 commit comments

Comments
 (0)