display success only when card read

This commit is contained in:
Christophe Robillard 2025-11-08 12:30:17 +01:00
parent dd86fbf687
commit 832f3d883c

View file

@ -74,7 +74,6 @@ void send_uid(char reader_uid[]) {
else { else {
//if you get here you have connected to the WiFi //if you get here you have connected to the WiFi
Serial.println("connected...yeey :)"); Serial.println("connected...yeey :)");
displaySuccess();
} }
auto client = std::make_unique<BearSSL::WiFiClientSecure>(); auto client = std::make_unique<BearSSL::WiFiClientSecure>();
@ -92,11 +91,12 @@ void send_uid(char reader_uid[]) {
if (httpCode > 0) { if (httpCode > 0) {
if (httpCode == HTTP_CODE_CREATED) { if (httpCode == HTTP_CODE_CREATED) {
displaySuccess();
} else { } else {
Serial.println("Remote error while sending uid");
displayError(); displayError();
} }
} else { } else {
Serial.print("Remote error while sending uid");
displayError(); displayError();
} }