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() {
9090}
9191
9292OTACloudProcessInterface::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 () {
93105 OTACloudProcessInterface::State res = Fetch;
94106 int http_res = 0 ;
95107 uint32_t start = millis ();
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ class OTADefaultCloudProcessInterface: public OTACloudProcessInterface {
4343
4444private:
4545 void parseOta (uint8_t * buffer, size_t bufLen);
46+ State fetchTime ();
47+ State fetchChunk ();
4648
4749 Client* client;
4850 HttpClient* http_client;
You can’t perform that action at this time.
0 commit comments