File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,22 @@ class Arduino_ESP32_OTA
97
97
// call progressDownload, until it returns OtaDownloadCompleted
98
98
// returns the value in content-length http header
99
99
int startDownload (const char * ota_url);
100
- OTADownloadState progressDownload ();
100
+
101
+ // This function is used to make the download progress.
102
+ // it returns 0, if the download is in progress
103
+ // it returns 1, if the download is completed
104
+ // it returns <0 if an error occurred, following Error enum values
105
+ int progressDownload ();
106
+
107
+ // this function is used to get the progress of the download
108
+ // it returns a positive value when the download is progressing correctly
109
+ // it returns a negative value on error following Error enum values
101
110
int downloadProgress ();
102
111
112
+ // this function is used to get the size of the download
113
+ // 0 if no download is in progress
114
+ size_t downloadSize ();
115
+
103
116
virtual void write_byte_to_flash (uint8_t data);
104
117
Arduino_ESP32_OTA::Error verify ();
105
118
Arduino_ESP32_OTA::Error update ();
@@ -123,6 +136,9 @@ class Arduino_ESP32_OTA
123
136
uint32_t downloadedSize;
124
137
uint32_t writtenBytes;
125
138
139
+ // If an error occurred during download it is reported in this field
140
+ Error error;
141
+
126
142
// LZSS decoder
127
143
LZSSDecoder decoder;
128
144
You can’t perform that action at this time.
0 commit comments