File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,14 @@ String startOtaUpdate(const String &url) {
1717 Serial .print ("[startOtaUpdate()] GET...\n" );
1818 // start connection and send HTTP header
1919 int httpCode = https .GET ();
20- if (httpCode < 0 ) return "GET... failed, error: " + https .errorToString (httpCode );
21- if (httpCode != HTTP_CODE_OK || httpCode != HTTP_CODE_MOVED_PERMANENTLY ) return "HTTP response code: " + String (httpCode );
22-
20+ if (httpCode != HTTP_CODE_OK ) return "GET... failed, error: " + https .errorToString (httpCode );
21+
2322 int contentLength = https .getSize ();
24- Serial .printf ("Content-Length : %d\n" , contentLength );
23+ Serial .printf ("OTA size : %d bytes \n" , contentLength );
2524
2625 if (contentLength == 0 ) return "There was no content length in the response" ;
2726
27+ Serial .printf ("Beginning update..!\n" );
2828 bool canBegin = Update .begin (contentLength );
2929
3030 if (!canBegin ) return "Not enough space to begin OTA" ;
@@ -45,4 +45,4 @@ String startOtaUpdate(const String &url) {
4545 return "" ;
4646}
4747
48- #endif
48+ #endif
You can’t perform that action at this time.
0 commit comments