remove logging on serial port
for performance reason
This commit is contained in:
parent
ee6bb36cc5
commit
9b0341bb79
1 changed files with 0 additions and 8 deletions
|
|
@ -88,7 +88,6 @@ void loop() {
|
||||||
http.begin(client, "http://192.168.1.32:3000/rfid_tags"); // HTTP
|
http.begin(client, "http://192.168.1.32:3000/rfid_tags"); // HTTP
|
||||||
http.addHeader("Content-Type", "application/json");
|
http.addHeader("Content-Type", "application/json");
|
||||||
|
|
||||||
Serial.print("[HTTP] POST...\n");
|
|
||||||
char str[32] = "";
|
char str[32] = "";
|
||||||
array_to_string(reader.uid.uidByte, 4, str); //Insert (byte array, length, char array for output)
|
array_to_string(reader.uid.uidByte, 4, str); //Insert (byte array, length, char array for output)
|
||||||
Serial.println(str); //Print the output uid string
|
Serial.println(str); //Print the output uid string
|
||||||
|
|
@ -98,19 +97,12 @@ void loop() {
|
||||||
// httpCode will be negative on error
|
// httpCode will be negative on error
|
||||||
if (httpCode > 0) {
|
if (httpCode > 0) {
|
||||||
// HTTP header has been send and Server response header has been handled
|
// HTTP header has been send and Server response header has been handled
|
||||||
Serial.printf("[HTTP] POST... code: %d\n", httpCode);
|
|
||||||
|
|
||||||
// file found at server
|
// file found at server
|
||||||
// if (httpCode == HTTP_CODE_OK) {
|
// if (httpCode == HTTP_CODE_OK) {
|
||||||
if (httpCode == HTTP_CODE_CREATED) {
|
if (httpCode == HTTP_CODE_CREATED) {
|
||||||
const String& payload = http.getString();
|
|
||||||
Serial.println("received payload:\n<<");
|
|
||||||
Serial.println(payload);
|
|
||||||
Serial.println(">>");
|
|
||||||
displaySuccess();
|
displaySuccess();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Serial.printf("[HTTP] POST... failed, error: %s\n", http.errorToString(httpCode).c_str());
|
|
||||||
displayError();
|
displayError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue