File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,18 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::startOTA() {
90
90
}
91
91
92
92
OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch () {
93
+ if (downloadTime > 0 ) {
94
+ return fetchTime ();
95
+ } else {
96
+ return fetchChunk ();
97
+ }
98
+ }
99
+
100
+ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetchChunk () {
101
+ return OtaDownloadFail;
102
+ }
103
+
104
+ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetchTime () {
93
105
OTACloudProcessInterface::State res = Fetch;
94
106
int http_res = 0 ;
95
107
uint32_t start = millis ();
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ class OTADefaultCloudProcessInterface: public OTACloudProcessInterface {
43
43
44
44
private:
45
45
void parseOta (uint8_t * buffer, size_t bufLen);
46
+ State fetchTime ();
47
+ State fetchChunk ();
46
48
47
49
Client* client;
48
50
HttpClient* http_client;
You can’t perform that action at this time.
0 commit comments