mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-18 23:27:44 +03:00
Clang
This commit is contained in:
parent
abb3dc3d43
commit
71fc35845b
@ -521,7 +521,8 @@ void CrossPointWebServer::handleUpload() {
|
||||
if (written != upload.currentSize) {
|
||||
uploadError = "Failed to write to SD card - disk may be full";
|
||||
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 {
|
||||
uploadSize += written;
|
||||
|
||||
@ -531,7 +532,9 @@ void CrossPointWebServer::handleUpload() {
|
||||
unsigned long timeSinceLastWrite = millis() - lastWriteTime;
|
||||
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(
|
||||
"[%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;
|
||||
}
|
||||
|
||||
@ -257,8 +257,8 @@ void loop() {
|
||||
|
||||
// Log if there's a significant gap between handleClient calls (>100ms)
|
||||
if (lastHandleClientTime > 0 && timeSinceLastHandleClient > 100) {
|
||||
Serial.printf("[%lu] [LOOP] WARNING: %lu ms gap since last handleClient (activity took %lu ms)\n",
|
||||
millis(), timeSinceLastHandleClient, activityDuration);
|
||||
Serial.printf("[%lu] [LOOP] WARNING: %lu ms gap since last handleClient (activity took %lu ms)\n", millis(),
|
||||
timeSinceLastHandleClient, activityDuration);
|
||||
}
|
||||
|
||||
crossPointWebServer.handleClient();
|
||||
@ -269,8 +269,8 @@ void loop() {
|
||||
if (loopDuration > maxLoopDuration) {
|
||||
maxLoopDuration = loopDuration;
|
||||
if (maxLoopDuration > 50) {
|
||||
Serial.printf("[%lu] [LOOP] New max loop duration: %lu ms (activity: %lu ms)\n",
|
||||
millis(), maxLoopDuration, activityDuration);
|
||||
Serial.printf("[%lu] [LOOP] New max loop duration: %lu ms (activity: %lu ms)\n", millis(), maxLoopDuration,
|
||||
activityDuration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user