Skip to content

Commit a71118c

Browse files
joeybab3devyte
authored andcommitted
Improve error messages (esp8266#2800)
I was having trouble understanding what some of the serial output meant so I changed it to the best of my ability
1 parent 2b868aa commit a71118c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,21 @@ String ESP8266HTTPUpdate::getLastErrorString(void)
135135

136136
switch(_lastError) {
137137
case HTTP_UE_TOO_LESS_SPACE:
138-
return F("To less space");
138+
return F("Not Enough space");
139139
case HTTP_UE_SERVER_NOT_REPORT_SIZE:
140-
return F("Server not Report Size");
140+
return F("Server Did Not Report Size");
141141
case HTTP_UE_SERVER_FILE_NOT_FOUND:
142-
return F("File not Found (404)");
142+
return F("File Not Found (404)");
143143
case HTTP_UE_SERVER_FORBIDDEN:
144144
return F("Forbidden (403)");
145145
case HTTP_UE_SERVER_WRONG_HTTP_CODE:
146-
return F("Wrong HTTP code");
146+
return F("Wrong HTTP Code");
147147
case HTTP_UE_SERVER_FAULTY_MD5:
148-
return F("Faulty MD5");
148+
return F("Wrong MD5");
149149
case HTTP_UE_BIN_VERIFY_HEADER_FAILED:
150-
return F("Verify bin header failed");
150+
return F("Verify Bin Header Failed");
151151
case HTTP_UE_BIN_FOR_WRONG_FLASH:
152-
return F("bin for wrong flash size");
152+
return F("New Binary Does Not Fit Flash Size");
153153
}
154154

155155
return String();
@@ -274,7 +274,7 @@ HTTPUpdateResult ESP8266HTTPUpdate::handleUpdate(HTTPClient& http, const String&
274274

275275
// check for valid first magic byte
276276
if(buf[0] != 0xE9) {
277-
DEBUG_HTTP_UPDATE("[httpUpdate] magic header not starts with 0xE9\n");
277+
DEBUG_HTTP_UPDATE("[httpUpdate] Magic header does not start with 0xE9\n");
278278
_lastError = HTTP_UE_BIN_VERIFY_HEADER_FAILED;
279279
http.end();
280280
return HTTP_UPDATE_FAILED;
@@ -285,7 +285,7 @@ HTTPUpdateResult ESP8266HTTPUpdate::handleUpdate(HTTPClient& http, const String&
285285

286286
// check if new bin fits to SPI flash
287287
if(bin_flash_size > ESP.getFlashChipRealSize()) {
288-
DEBUG_HTTP_UPDATE("[httpUpdate] magic header, new bin not fits SPI Flash\n");
288+
DEBUG_HTTP_UPDATE("[httpUpdate] New binary does not fit SPI Flash size\n");
289289
_lastError = HTTP_UE_BIN_FOR_WRONG_FLASH;
290290
http.end();
291291
return HTTP_UPDATE_FAILED;
@@ -309,7 +309,7 @@ HTTPUpdateResult ESP8266HTTPUpdate::handleUpdate(HTTPClient& http, const String&
309309
} else {
310310
_lastError = HTTP_UE_SERVER_NOT_REPORT_SIZE;
311311
ret = HTTP_UPDATE_FAILED;
312-
DEBUG_HTTP_UPDATE("[httpUpdate] Content-Length is 0 or not set by Server?!\n");
312+
DEBUG_HTTP_UPDATE("[httpUpdate] Content-Length was 0 or wasn't set by Server?!\n");
313313
}
314314
break;
315315
case HTTP_CODE_NOT_MODIFIED:

0 commit comments

Comments
 (0)