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
58
58
WiFiDrv::downloadFile (url, strlen (url), filename, strlen (filename));
59
59
return true ;
60
60
}
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;
63
67
}
64
68
65
69
@@ -78,8 +82,8 @@ class WiFiStorageClass
78
82
static bool download (String url, String filename) {
79
83
return download (url.c_str (), filename.c_str ());
80
84
}
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 );
83
87
}
84
88
};
85
89
You can’t perform that action at this time.
0 commit comments