mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-19 07:37:41 +03:00
Clang
This commit is contained in:
parent
abb3dc3d43
commit
71fc35845b
@ -521,7 +521,8 @@ void CrossPointWebServer::handleUpload() {
|
|||||||
if (written != upload.currentSize) {
|
if (written != upload.currentSize) {
|
||||||
uploadError = "Failed to write to SD card - disk may be full";
|
uploadError = "Failed to write to SD card - disk may be full";
|
||||||
uploadFile.close();
|
uploadFile.close();
|
||||||
Serial.printf("[%lu] [WEB] [UPLOAD] WRITE ERROR - expected %d, wrote %d\n", millis(), upload.currentSize, written);
|
Serial.printf("[%lu] [WEB] [UPLOAD] WRITE ERROR - expected %d, wrote %d\n", millis(), upload.currentSize,
|
||||||
|
written);
|
||||||
} else {
|
} else {
|
||||||
uploadSize += written;
|
uploadSize += written;
|
||||||
|
|
||||||
@ -531,8 +532,10 @@ void CrossPointWebServer::handleUpload() {
|
|||||||
unsigned long timeSinceLastWrite = millis() - lastWriteTime;
|
unsigned long timeSinceLastWrite = millis() - lastWriteTime;
|
||||||
float kbps = (uploadSize / 1024.0) / (timeSinceStart / 1000.0);
|
float kbps = (uploadSize / 1024.0) / (timeSinceStart / 1000.0);
|
||||||
|
|
||||||
Serial.printf("[%lu] [WEB] [UPLOAD] Progress: %d bytes (%.1f KB), %.1f KB/s, write took %lu ms, gap since last: %lu ms\n",
|
Serial.printf(
|
||||||
millis(), uploadSize, uploadSize / 1024.0, kbps, writeDuration, timeSinceLastWrite);
|
"[%lu] [WEB] [UPLOAD] Progress: %d bytes (%.1f KB), %.1f KB/s, write took %lu ms, gap since last: %lu "
|
||||||
|
"ms\n",
|
||||||
|
millis(), uploadSize, uploadSize / 1024.0, kbps, writeDuration, timeSinceLastWrite);
|
||||||
lastLoggedSize = uploadSize;
|
lastLoggedSize = uploadSize;
|
||||||
}
|
}
|
||||||
lastWriteTime = millis();
|
lastWriteTime = millis();
|
||||||
|
|||||||
@ -257,8 +257,8 @@ void loop() {
|
|||||||
|
|
||||||
// Log if there's a significant gap between handleClient calls (>100ms)
|
// Log if there's a significant gap between handleClient calls (>100ms)
|
||||||
if (lastHandleClientTime > 0 && timeSinceLastHandleClient > 100) {
|
if (lastHandleClientTime > 0 && timeSinceLastHandleClient > 100) {
|
||||||
Serial.printf("[%lu] [LOOP] WARNING: %lu ms gap since last handleClient (activity took %lu ms)\n",
|
Serial.printf("[%lu] [LOOP] WARNING: %lu ms gap since last handleClient (activity took %lu ms)\n", millis(),
|
||||||
millis(), timeSinceLastHandleClient, activityDuration);
|
timeSinceLastHandleClient, activityDuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
crossPointWebServer.handleClient();
|
crossPointWebServer.handleClient();
|
||||||
@ -269,8 +269,8 @@ void loop() {
|
|||||||
if (loopDuration > maxLoopDuration) {
|
if (loopDuration > maxLoopDuration) {
|
||||||
maxLoopDuration = loopDuration;
|
maxLoopDuration = loopDuration;
|
||||||
if (maxLoopDuration > 50) {
|
if (maxLoopDuration > 50) {
|
||||||
Serial.printf("[%lu] [LOOP] New max loop duration: %lu ms (activity: %lu ms)\n",
|
Serial.printf("[%lu] [LOOP] New max loop duration: %lu ms (activity: %lu ms)\n", millis(), maxLoopDuration,
|
||||||
millis(), maxLoopDuration, activityDuration);
|
activityDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user