File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,12 @@ class WiFiStorageClass
5858 WiFiDrv::downloadFile (url, strlen (url), filename, strlen (filename));
5959 return true ;
6060 }
61- static bool downloadOTA (const char * url) {
62- return (WiFiDrv::downloadOTA (url, strlen (url)) == 0 );
61+ static bool downloadOTA (const char * url, uint8_t * res_ota_download = NULL ) {
62+ uint8_t const res = WiFiDrv::downloadOTA (url, strlen (url));
63+ if (res_ota_download)
64+ *res_ota_download = res;
65+ bool const success = (res == 0 );
66+ return success;
6367 }
6468
6569
@@ -78,8 +82,8 @@ class WiFiStorageClass
7882 static bool download (String url, String filename) {
7983 return download (url.c_str (), filename.c_str ());
8084 }
81- static bool download (String url) {
82- return downloadOTA (url.c_str ());
85+ static bool download (String url, uint8_t * res_ota_download = NULL ) {
86+ return downloadOTA (url.c_str (), res_ota_download );
8387 }
8488};
8589
You can’t perform that action at this time.
0 commit comments