Only print error messages to serial if debug is TRUE

This commit is contained in:
Junior 2026-10-20 17:43:10 -04:00
parent a5300f34e6
commit d2848e84e9

View File

@ -48,6 +48,9 @@ unsigned long sendDeviceStatus() {
http.addHeader("Content-Type", "application/x-www-form-urlencoded");
String httpData = "mac=" + WiFi.macAddress() + "&board=" + BOARD + "&firmware=" + BOARDFIRMWARE + "&service=" + SERVICE;
int httpResponseCode = http.POST(httpData);
if ( DEBUG && (httpResponseCode != 200) ) {
Serial.println("Error sending status: " + String(httpResponseCode));
}
http.end();
return millis();
}